Hi,

Thanks for the response.

The exact syntax of the page is:

<jsp:useBean id="foo" class="Bar" scope="session">
<jsp:setProperty name="foo" property="*"/>
</jsp:useBean>

So I think the bean is created correctly (?). This initial form/bean
combination is then forwarded on to a confirmation page where the user can
validate that what was entered is correct (at this point, the data entered
into the form is retrived from the bean, so the intial creation/loading
appears to be OK). The problem occurs when the user hits "back", updates the
form and hits submit for the second time. The confirmation page does not
reflect the changes made to the session beans properties.

-Pete

-----Original Message-----
From: Kevin Jones [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 01, 2001 12:31 PM
To: [EMAIL PROTECTED]
Subject: Re: refresh of Session scoped beans


Where are your setProperty elements

If your page looks like this

<jsp:useBean scope="session... >
 <jsp:setProperty ... />
</jsp:useBean>

That's exactly what I'd expect. The body of the jsp:useBean tag is only
executed iif the bean is created.

Try this

<jsp:useBean scope="session... />

<jsp:setProperty name="foo" property="*"/>


Does it still fail?


Kevin Jones
DevelopMentor
www.develop.com

> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of Peter Bishop
> Sent: 01 February 2001 16:56
> To: [EMAIL PROTECTED]
> Subject: refresh of Session scoped beans
>
>
> Hi all,
>
> A recent thread out here has me playing with the "scope" attribute of the
> <jsp:useBean> tag. Unfortunately, I have hit a wall. When using a bean of
> scope="session", which is populated from an HTML form using a
> <jsp:setProperty name="foo" property="*"/>. The initial population of the
> bean is OK, however when I hit "back" on the browser to make
> corrections to
> the form data, subsequent updates of the beans information are not
> successful. This is alleviated by using a bean of scope="request", however
> that is not what I need. Anyone encounter this problem and have a
> solution???
>
> TIA.
>
> -Pete
>
> ==================================================================
> =========
> 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

===========================================================================
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

===========================================================================
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