Posted By:
Alvin_Lim
Posted On:
Thursday, September 13, 2001 08:54 PM
How do I re-assign a property on a JavaBean using with scope="session"? When I instantiate a session bean using JSP as such : with a setter method on the bean : class someBean { .... public void setA(String s) { System.out.println("Setting property A "); this.a = s; } it works the the first time the bean is instantiated with the following value posted : But when the same JSP page is called again, with the same attributes being posted but a different value, ie : the setter me
More>>
How do I re-assign a property on a JavaBean using
with scope="session"?
When I instantiate a session bean using JSP as such :
with a setter method on the bean :
class someBean {
....
public void setA(String s)
{
System.out.println("Setting property A ");
this.a = s;
}
it works the the first time the bean is instantiated with the following value posted :
But when the same JSP page is called again, with the same attributes being posted but a different value, ie :
the setter method above is not called a second time. So the bean retains the orginal value of 1.
My question is :
1. Is this some property of a session bean?
2. If so, how do I re-assign a value on a session bean?
Thanx.