Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0002936 [Resin] minor always 09-14-08 15:19 09-18-08 16:14
Reporter jlawrie View Status public  
Assigned To ferg
Priority normal Resolution fixed  
Status closed   Product Version 3.1.6
Summary 0002936: Taglib usage fails in JSP tag file when prefixes vary
Description This bug has two aspects, using custom tags and using custom tag functions. If you define a custom tag library with a different prefix between a jsp and a jsp tag file the jsp is using, compilation of the jsp and tag will fail. For example, we have test.jsp:

<%@ taglib uri="" [^] prefix="c1" %>
<%@ taglib prefix="misc" tagdir="/WEB-INF/tags" %>

<c1:out value="This is a jsp" />


and a test.tag:

<%@ taglib uri="" [^] prefix="c2" %>

<c2:out value="This is a tag file" />

with auto compilation on, loading test.jsp results in the exception: com.caucho.jsp.JspLineParseException: /WEB-INF/tags/test.tag:1: org.xml.sax.SAXParseException: The prefix "c1" for element "c1:out" is not bound.

Applying the same pattern but this time trying to make use of JSTL functions, we have test.jsp:
<%@ taglib uri="" [^] prefix="fn1" %>
<%@ taglib prefix="misc" tagdir="/WEB-INF/tags" %>

${fn1:toUpperCase('this is a jsp file') }


and test.tag:

<%@ taglib uri="" [^] prefix="fn2" %>

${fn2:toUpperCase('this is a tag file')}

loading test.jsp results in the exception: com.caucho.el.ELParseException: 'fn2:toUpperCase' is an unknown function.

It we peek inside the java class created for test.tag, we see that the functions taglib has been mapped to the fn1 prefix: manager.addTaglibFunctions(_jsp_functionMap, "fn1", ""); [^]
Additional Information
Attached Files

- Relationships

- Notes
09-18-08 16:14


- Issue History
Date Modified Username Field Change
09-14-08 15:19 jlawrie New Issue
09-18-08 16:14 ferg Note Added: 0003465
09-18-08 16:14 ferg Assigned To  => ferg
09-18-08 16:14 ferg Status new => closed
09-18-08 16:14 ferg Resolution open => fixed
09-18-08 16:14 ferg Fixed in Version  => 3.1.8

Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker