custom jsp tag library attributes some working others not
[nobr]I have a custom tag library that I am trying to pass a parameter to. Some parameters can be passed but others can not. For example:
<%@ taglib uri="/taglib/blah.tld" prefix="blah" %>
<blah:simple selectid="<%=new Date().toGMTString()%>"/>
returns
23 Jul 2007 22:11:42 GMT
<blah:simple selectid="<%=request.getAttributeNames().toString()%>"/>
returns
java.util.Vector$1@e5d9d2
But when ido something likethis:
<blah:simple selectid="<%=((NameBean)request.getAttribute("NameBean")).getFname()%>"/>
the jsp returns
<blah:simple selectid="Jeff"/>
The name is right but I want to evaluate the expression not just display a tag.
My workaround is todothis:
<%
String myname =((NameBean)request.getAttribute("NameBean")).getFname()
%>
<blah:simple selectid="<%= myname %>"/><br>
which returns the correct value ... Jeff
my tld is defined likethis:
...
<tag>
<name>simple</name>
<tagclass>com.mycompany.blahtag </tagclass>
<bodycontent>empty</bodycontent>
<info></info>
<attribute>
<name>selectid</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
</tag>
...
Any thoughts? I am using jdk 1.4x and weblogic 8?[/nobr]

