• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

saving the data into database

 
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Marshal
Posts: 26912
82
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could you please explain in detail with small example?


thanks
 
Paul Clapham
Marshal
Posts: 26912
82
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic