Custom tag library - some attributes 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. This is a really simplified 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
I don't see a difference in these two expressions.
my tld is defined like this:
...
<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][/nobr]

