struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicolas De Loof" <>
Subject <bean:define> and JSP 1.1 restriction
Date Thu, 26 Jun 2003 07:56:25 GMT
Hi all,

I can read in struts-bean doc this usage note for <bean:define> tag :

There is a restriction in the JSP 1.1 Specification that disallows using the same value for
an id attribute more than
once in a single JSP page. Therefore, you will not be able to use <bean:define> for
the same bean name more than once in
a single page."

Some of my JSPs use bean:define to "compute" a boolean value from other datas that is use
in a <logic> tag later in JSP.
It looks like this :

<bean:define id="dolink" value="false"/>
<logic:equal ....>
    <bean:define id="dolink" value="true"/>

This code works fine on tomcat 4.1.24 and weblogic 6.1 SP5.
Reading the usage note, it should not work according to JSP 1.1 spec. Someone in my team uses
tomcat 4.0.6 and got
errors with this "mutliple" <bean:define>.

- Does JSP 1.2 has this restriction to ?

- Do you think I should upgrade my JSP to be "JSP 1.1 compliant", assuming it works fine on
target container (Weblogic)

- How to avoid using multiple times the same id (Do I need to build a custiom tag ?)


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message