Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

getting user registration data at the end

 
kumar amara
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64827
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Sharad Jadhav
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes! you are right go for session rather request
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic