• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Session or DB

 
Sahil Sharma
Ranch Hand
Posts: 152
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a requirement wherein I am taking the user input in 7 steps. Each step is a JSP.
I am wondering what is the best approach with respect to saving the data.

a) Should I save the data in session as the user moves from step1 to step7 and then save it in the database. This approach will put huge data in the session. Though the user base of this application is only 5-6 users.

b) Save it everytime in the database as the user moves from step1 to step7. The problem with this approach is what if user decides not to complete all the steps and leave after step4 then I will have to rollback the data for Step1 to Step4.

Secondly, currently we have given Next button on each JSP page to move to next Step. Can this also be implemented in tabs wherein each tab will be a seperate JSP page?

I am using Struts framework to develop the application.

Please advise.
 
Shailesh Narkhede
Ranch Hand
Posts: 368
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Better to put data in session,
because after you given data in 4 steps as you said you can rollback how would be do that?
Is that 7 steps having 7 different DB tables?
If that is so we need so have column in that tables which is reffering to main table PK of user.
On that basis we can delete that data after 4th step. but that not sounds good.

So I thing better to hold data in session till 7 step.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic