Meaningless Drivel is fun!
The moose likes JSP and the fly likes Sending value from one jsp page to another jsp page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Sending value from one jsp page to another jsp page" Watch "Sending value from one jsp page to another jsp page" New topic
Author

Sending value from one jsp page to another jsp page

Aggarwal Arpit
Ranch Hand

Joined: Mar 04, 2012
Posts: 86
Hi,

If anybody having 2 jsp pages say, Page1.jsp and Page2.jsp and want to pass value from Page1.jsp to Page2.jsp, then he can do by using this line on Page1:

<a href="Page1.jsp?itemId=${list.id}" />


and this line on Page2:

request.getParameter("itemId");


Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 32330
    
213

Yes. It would be better to go to a servlet first for processing, but this does work.


[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
 
subject: Sending value from one jsp page to another jsp page
 
jQuery in Action, 3rd edition