aspose file tools*
The moose likes JSP and the fly likes Passing data from jsp to jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Passing data from jsp to jsp" Watch "Passing data from jsp to jsp" New topic
Author

Passing data from jsp to jsp

Martin Baldwin
Greenhorn

Joined: Jun 21, 2013
Posts: 8
I have an application where a form jsp page is called by and passes data to a servlet. However, I now want to add on additional forms where users can click a Next button to take them to a new page with a new form and at the end of the forms, click Submit and have all of the data passed back to a single servlet. Should I be passing the data from jsp to jsp or submitting back to the servlet with each click of the Next button? Thanks.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60077
    
  65

WHy not aggregate the data in the session?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Martin Baldwin
Greenhorn

Joined: Jun 21, 2013
Posts: 8
Like this?

Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60077
    
  65

Saving it in page context will not persist it across multiple requests; that's what the session is for. You can obtain the session reference from the request.
william blake
Greenhorn

Joined: Jul 17, 2013
Posts: 9

use session is the best way, but you should konw othere way by request,
values are passed page A to page B by request, so page B can get values by request.getParameters("xx")

maybe it can help you。
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Passing data from jsp to jsp
 
Similar Threads
Data of previous form gets submitted on refersh
JSP page with four buttons
Sending checkbox value to two different servlet page
Writing to a text file using servlet
Sending data to popup window