wood burning stoves 2.0*
The moose likes JSP and the fly likes getting user registration data at the end Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "getting user registration data at the end" Watch "getting user registration data at the end" New topic
Author

getting user registration data at the end

kumar amara
Greenhorn

Joined: Oct 27, 2009
Posts: 24
Greetings!

I want to get the user data in 3 steps ,so when he clicks next button it will direct him to the next page if he clicks back he should be able to see and edit the previous page data at last this data should be submitted to 3 tables.

thanks in advance!
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

What's the question, how to save the data? Normally the data would be put into session, although you could also save partial forms in the DB and only mark it as complete at the final stage.
Sharad Jadhav
Greenhorn

Joined: Feb 10, 2010
Posts: 18
You can create object of the user and pass it to back on forth.

You can set the object using
Xyz xyz = new Xyz();
request.setAttribute("xyz", xyz);

you will get the same object request.getAttribute("xyz");

Also set values to the object and retrieve it on each page

Java J2EE Hibernate Spring
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60782
    
  65

Vijay Kakade wrote:You can set the object using
request.setAttribute("xyz", xyz);

Nope. That will not work. The object will be lost when the client traverses to the next page.

To retain the data across requests, the session (or other persistent storage as David pointed out) must be used.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Sharad Jadhav
Greenhorn

Joined: Feb 10, 2010
Posts: 18
yes! you are right go for session rather request
 
 
subject: getting user registration data at the end
 
Similar Threads
Sorting the fields of a table
Using Html:radio with logic:iterate
best way to show editable search results in page
Meta Refresh
Session expired