|
Having not gotten a reply to an earlier post, and
being of the impatient sort, I cobbled together a pared down demo of a problem
I'm having where a tag's attribute is given a value from an _expression_ but the
_expression_ is never interpreted.
HTML:
<%@ page
language="java" contentType="text/html" %> <%@ taglib uri="/WEB-INF/tlds/default.tld" prefix="tt" %> <html> <head> <% String foo = "_expression_"; %> </head> <body> <tt:tTag var="<%=foo%>" /> </body> </html> TAG SOURCE:
package org.tagTest;
import javax.servlet.jsp.*;
import javax.servlet.jsp.tagext.*; public class ttag extends
TagSupport
{ private String var; public void setVar(String v) { var = v; } public int doEndTag () { try { pageContext.getOut().println(var); } catch(Exception e) { } return EVAL_PAGE; } } TAGLIB DEFS:
<?xml version="1.0"
encoding="ISO-8859-1" ?>
<!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.0</tlibversion> <jspversion>1.1</jspversion>
<shortname>tagTest</shortname> <tag> <name>tTag</name> <tagclass>org.tagTest.ttag</tagclass> <attribute> <name>var</name> </attribute> </tag> </taglib> RESULTANT PAGE SOURCE:
<html>
<head> </head> <body> <%=foo%> </body>
</html> |
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
