tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Darryl L. Miles" <>
Subject JSP 2.x *.tag files problem
Date Mon, 03 Apr 2006 14:36:16 GMT
My question is about the use of *.tag files, to have the container (TC) automatically build
tag libraries from my test.tag file.  But some aspects don't work as I would naturally expect
and I don't know
if this is my lack of understanding or a genuine bug.

When I use <%@ attribute name="vvAbcDefGhi" required="false" ... %> I have no problem.

Now when I start to alter the name="" value so that it uses the values:

vvAbcDefGhi (no problem here)
vvabcdefghi (no problem here)
vAbcDefGhi (does not work for me, I would expect this to be ok)
AbcDefGhi (does not work for me, I'm less sure if this is ok but can't see any reason why
it isn't allowed providing the name does not clash with another defined attribute called abcDefGhi)

When I say it does not work for me I can an error about being unable to find the setter function
of the generated tag library.

There is a function in org/apache/jasper/compiler/ which seems to do the business
#generateTagHandlerAttributes(TagInfo tagInfo) converts it into code.  I have tested the methods
and #toSetterMethodName(String) with my tag attribute names above and I get expected case

Here is a cut and paste of the parts I think are relevant.


<%@ tag language="java" pageEncoding="UTF-8" body-content="scriptless" %>
<%@ attribute name="vvAbcDefGhi" required="false" rtexprvalue="true" %>
<%@ taglib prefix="c" uri="" %>
My HTML is here ${vvAbcDefGhi}


<%@ page language="java" contentType="text/html; charset=UTF-8" 
pageEncoding="UTF-8" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" 
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags" %>
<tags:test vvAbcDefGhi="value1" />

Darryl L. Miles

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message