DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18314>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=18314

Multiple declarations of same taglib cause exception during validation

           Summary: Multiple declarations of same taglib cause exception
                    during validation
           Product: Tomcat 4
           Version: 4.1.18
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Jasper 2
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


If the same taglib is declared twice with the same prefix and uri the following
exception occurs:

org.apache.jasper.JasperException: <h3>jsp.error.tlv.invalid.page</h3><p>null:
org.xml.sax.SAXParseException: Attribute "xmlns:c" was already specified for
element "jsp:root".</p>
        at
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:105)
        at
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:430)
        at
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:112)
        at org.apache.jasper.compiler.Validator.validateXmlView(Validator.java:661)
        at org.apache.jasper.compiler.Validator.validate(Validator.java:613) 

We're experiencing this problem with our templating system in cases where it is
using static includes and both the template and the included fragments use the
same tag library (typically JSTL). This is not a problem with dynamic includes.

It's possible to recreate the problem with a simple JSP:

<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %>
<%@ taglib prefix="c" uri="http://java.sun.com/jstl/core"; %>
<html>
<head><title>Test</title></head>
<body>
Test
</body>
</html>

As far as we're aware there's nothing in the spec that says the same taglib
can't be declared twice with the same prefix, and it should be possible to
deduplicate to prevent the attribute being declared twice on jsp:root.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to