struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mlinar, Mario" <Mario.Mli...@shs.de>
Subject <logic:present Problem
Date Fri, 06 Feb 2004 11:22:57 GMT
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.
 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message