Anonymous | Login | Signup for a new account | 12-17-2024 11:49 PST |
Main | My View | View Issues | Change Log | Docs |
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="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"); [^] |
||||||||
Additional Information | |||||||||
Attached Files | |||||||||
|
Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed. 26 unique queries executed. |