Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

saving the data into database

 
anvi kon
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have four pages...with navigation button next on the page.

I am not saving the data on the same page..I want to save the data of all four pages only when I click the button finish on the last page.

How would I carry the data from the first page to last and save into the database?

Do I have to write a stored procedure ? But in the action form , I don't see the data?

Can anyone please help me?


Thanks
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Normally when you need to save data from one request to the next, you put that data into the user's session.
 
anvi kon
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could you please explain in detail with small example?


thanks
 
Paul Clapham
Sheriff
Posts: 21107
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, I'm not going to work up an example of four pages using Struts which stores data in the session. That's way too much to ask.

And what detail do you want? "Store the information in the session" should be all the detail you need. You get the request from page 1, you extract the data from it and store that in the session. Same for page 2 and page 3. When you get the request from page 4, you extract the data from it and combine it with the data you stored in the session. Update the database with that.
 
kaushal sharma
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Anvi,

Don't bother about the steps. It's simple and you can easily get the hints if you search sessions on google.


-Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic