How can a JSP page transmit a parameter from one page to another ?, Another jsp
(1 ). one is redirection jump, and the hyper-connection <a> is a redirection jump. In this way, the request object cannot be passed to the next page, and the request object obtained from the next page is a new object, instead of uploading data from the previous page, you will not be able to get the data from the previous page. if you want to jump through this method, you need to use
① <A href = "a. jsp? Parameter Name = parameter value "> ② use request. getParameter (" parameter name ") on the next page to get the value
(2) another type of jump is forwarding. This type of Jump request object is passed to the next page. You can use
① <Jsp: forward page = "/. jsp "/> // you can use request. the setAttribute () method is stored in the request object, and ② the request is used to go to the next page. getAttribute () gets the parameter.
The most obvious difference between the two methods is that when you redirect to. jsp to B. the address bar of the jsp page is. jsp changes to B. jsp; on the contrary, when you jump from. jsp to B. the address bar is still. jsp address