You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Moritz Petersen <mo...@mac.com> on 2002/01/11 18:11:02 UTC
multipe 's in one page?
Hello,
I would like to use <bean:define> to overwrite a previously defined bean.
Example:
<bean:define id="mybean" value="foo"/>
<bean:write name="mybean"/>
<bean:define id="mybean" value="bar"/>
<bean:write name="mybean"/>
Unfortunately, this is not possible, because the Servlet code would contain
String mybean = null;
mybean = "foo";
...
String mybean = null; // <= Problem!
mybean = "bar";
, which defines the variable "mybean" in the same scope twice.
Is it possible to work around that problem? I mean to redefine the value of
a bean in the same scope?
Thank you,
Mo.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>