make shore that your bean has the scope of session, this way it will be kept
between requests.
lee
Lee Elenbaas
ViryaNet
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
http://www.viryanet.com/
-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Mauro Gagni (EMS)
Sent: Tuesday, June 20, 2000 12:11 PM
To: [EMAIL PROTECTED]
Subject: sendRedirect problem, loosing bean changes!?
Hi all,
I am having some troubles maintaining the changes of my bean done before a
response.sendRedirect(). What happens is this:
I have an if statement where I change a few parameters of my session bean
i.e. mybean.setMyProperty("newValue") bean and then I sendRedirect() to the
page I want. It apparently works fine because I get the page I request with
the redirection, but my bean has lost the change in the property so if I do
a .getMyProperty() I get "oldValue" and not what I expected ("newValue").
Is this 'normal' or there is something that I am missing?
please help me in undestanding what happens.
TIA, mauro
the sample code in my JSP page
<jsp:useBean id="ureg" class="com.emsuk.UserRegistration" scope="session" />
<%
if (ureg.create()) {
ureg.setFormCurrent("");
response.sendRedirect("Succesful.html");
else {
...
}
%>
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
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
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
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