Mantis Bugtracker
  

Viewing Issue Advanced Details Jump to Notes ] View Simple ] 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 Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 3.1.8 Product Version 3.1.6
  Product Build
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="http://java.sun.com/jsp/jstl/core" [^] prefix="c1" %>
<%@ taglib prefix="misc" tagdir="/WEB-INF/tags" %>

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


<misc:test/>

and a test.tag:

<%@ taglib uri="http://java.sun.com/jsp/jstl/core" [^] 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="http://java.sun.com/jsp/jstl/functions" [^] prefix="fn1" %>
<%@ taglib prefix="misc" tagdir="/WEB-INF/tags" %>

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


<misc:test/>

and test.tag:

<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" [^] 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", "http://java.sun.com/jsp/jstl/functions"); [^]
Steps To Reproduce
Additional Information
Attached Files

- Relationships

- Notes
(0003465)
ferg
09-18-08 16:14

jsp/1122
 

- 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