hello,

with hopes that somebody will respond this time...

I have a javabean that controls the language of a site, with a property
'language' that gets set by an url parameter when I instantiate the bean:

<jsp:useBean id="text" class="TextBean" scope="session">
        <jsp:setProperty name="text" property="language" value="<%
request.getParameter("language") %>" />
</jsp:useBean>

the property takes one of two values - "eng" for english and "por" for
portuguese.

this works fine if the user doesn't intend on switching back once he
sets a language, but after the bean is instantiated I can't set the
property to another value. I've tried using

<jsp:setProperty> outside the <jsp:useBean> open and close tags, and
I've tried having a separate jsp page be called, which would set the
property and then forward the request back, following the shopping cart
example of the jsp book (addtocart.jsp, chapter 8), but none of these
seem to work. the value remains the same.

it seems to me it'd be pretty straightforward to change properties of
bean with a session scope... what am I doing wrong?

thanks,
Oliver

===========================================================================
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://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to