This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
If you're familiar with servlets, you can use the HttpSession object to store your session data as attributes. Same thing happens in a JSP, noting that every JSP page has an implicit reference to current session called session.
Hi Sharon, I would like to recommend that you use Struts, an open source MVC framework from The Jakarta Project. You might be using Model 1 in your JSP app, but believe me it's all worth it if you try out Struts. Struts has so-called ActionForm objects which are tied to forms (obviously). These are session-based so the form fields' values are retained until the session lasts. What's novel is that, just tell Struts that this form has a corresponding ActionForm object, and Struts will automatically tie that form to the ActionForm object for you. Also, ActionForm objects perform field validation when the form gets POSTed so it is another added convenience. If you are pressed on time, you can use a session bean to track down values of fields in a form, but basically you're just reinventing the wheel. GL Ex Animo Java! -- Val [ June 25, 2002: Message edited by: Val Pecaoco ]
"Knowledge is power, but enthusiasm is the key." -- Lavern Barn
Joined: Feb 09, 2002
Thank you for your comments. Unfortunately this app has been written in JSP with a few java classes attached...I will definetely look into Struts on a future java project.