Hi,
1) Define hidden var for each one upto last/requirement page like: <input
type=Hidden name=abc value=<%field-value%>
2) Define var in bean as static and initialize them at the last page.
3) Define session variables and destroy at the last page.

Hamid Hassan
Software Engineer
Visualsoft Pvt. Ltd.

-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Mohammad Ramzan
Sent: Wednesday, August 08, 2001 9:21 PM
To: [EMAIL PROTECTED]
Subject: Re- initialising a Bean



Hello,

I am having trouble,
The scenario is:
To create a new project a user has to fill out three forms in sequence.
For each form I am storing the form values in separate beans using
jsp:setProperty, the beans have session scope.
I can then submit these variables into the database once the user
reaches the last stage.

The problem:
This works fine but when the user goes to create another new project the
form values in the beans are not be overwritten, this is because of the
session scope.

The question:
How can I re-initialise a bean for every request but still give it
session scope so I can submit the values to the DB, two pages later?

I have been going round in circles on this one, any help is much
appreciated.

Thanks, Mo

=========================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST
DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=P
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=rvlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to