tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank W. Zammetti" <fzli...@omnytex.com>
Subject Custom tag runtime expression problem
Date Thu, 18 Aug 2005 20:02:49 GMT
Hi all,

I'm using Tomcat 5.0.29.  I've created a custom tag and I need to be able
to use runtime expressions for certain attributes.  But it isn't working
and I'm beating my head on the desk trying to figure out why.

Here's my TLD:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library
1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd">
<taglib>
<tlibversion>1.2</tlibversion>
<jspversion>1.1</jspversion>
<shortname>mytags</shortname>
<uri>com/company/taglib</uri>
<tag>
<name>button</name>
<tagclass>com.company.app.taglib.ButtonTag</tagclass>
<bodycontent>empty</bodycontent>
<attribute>
<name>id</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
<name>onClick</name>
<required>true</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
<attribute>
</tag>
</tag>
</taglib>

Specifically, I'm trying to do this on the page:

<%@ taglib uri="/WEB-INF/apptags.tld" prefix="app" %>
...
<% String fName = (String)hm.get("name"); %>
<app:button id="btnSelect" onClick="selectAll(<%=fName%>);" />

Now, the button renders its code just fine, the *ONLY* thing that isn't
working is that the emitted HTML includes the string <%=fName%> instead of
it being evaluated.  I've verified that the fName string *DOES* get the
appropriate value in it.  So, as near as I can tell, the taglib code
itself, all the setup, etc., is fine, *EXCEPT* for the ability to do
runtime expressions like this.

What am I missing?  Does this need to be turned on in Tomcat or something?
 I wouldn't think so, but I'm at a loss.

Thanks!

Frank

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message