File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSP and the fly likes how to store data Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "how to store data" Watch "how to store data" New topic
Author

how to store data

Ramkumar Subburaj
Ranch Hand

Joined: Sep 07, 2007
Posts: 83
I have a user registration requirement and the registration itself consists of 6 pages. what is the best way to do this?

can i store all the data in a bean and store that bean in the session because i can have the property names in the bean same as that of the input fields in the java servlet page and have java servlet page standard action store that data automatically in the bean and then store that data in the database after the 6th page.

One of my friend has done in a way that after the user enters his details in each page and goes to the next, the previous page data gets stored in the database. like hitting the database min 6 times to complete the registration. if the user uses back button to make some changes, again the database is hit which i feel takes much resource.

please suggest me the best option and how about the option i suggested?


SCJP 1.5, SCWCD 1.4.
Hanging between Web Services and EJB
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60794
    
  65

Personally I would avoid the database approach unless it were a requirement that the registration process could be stopped and restarted at any point.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Ramkumar Subburaj
Ranch Hand

Joined: Sep 07, 2007
Posts: 83
there is no stopping and restarting the process.

is there any problem storing 40 to 50 fields in a bean which inturn is stored in session
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60794
    
  65

No, if recovering values in the event of an interrupted session is not required.
Ramkumar Subburaj
Ranch Hand

Joined: Sep 07, 2007
Posts: 83
ok. thanks Bear
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to store data
 
Similar Threads
long post IBM.158
Architecture issue...common database access interface
Does anyone solved ICE Test 286, 287 100% ?
Distinction between Stateful and Standard session bean.
reset jsf form