My Action put�s a JavaBean into my request. Depending on the instance Type
of my Bean I choose different Parameter names for my Bean.
Code snippet Action:
if (object instanceof A) {
request.setAttribute("y", object);
} else if(object instanceof B) {
request.setAttribute("x", object);
}
Code snippet JSP:
<logic:present name=" ...RTExpression.. ">
<bean:define id="free" name"y" type="..A.." scope="request"/>
</logic:present>
<logic:present name="...RTExpression..">
<bean:define id="private" name"x" type="..B.." scope="request"/>
</logic:present>
Now every time a Bean of type A was put in the request I get the
message:org.apache.jasper.JasperException: Cannot find bean x in scope
request
Now every time a Bean of type B was put in the request I get the
message:org.apache.jasper.JasperException: Cannot find bean y in scope
request
Using only one <logic:present ..> works perfect ....
Where is the problem ???
Thanks for any help in advance.
by the way: using struts 1.1 with Tomcat 4.1.