GeeCON Prague 2014*
The moose likes Struts and the fly likes saving the data into database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Frameworks » Struts
Bookmark "saving the data into database " Watch "saving the data into database " New topic
Author

saving the data into database

anvi kon
Ranch Hand

Joined: Jan 08, 2010
Posts: 133
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
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

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

Joined: Jan 08, 2010
Posts: 133
Could you please explain in detail with small example?


thanks
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18570
    
    8

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

Joined: Oct 04, 2009
Posts: 26
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
 
Don't get me started about those stupid light bulbs.
 
subject: saving the data into database