https://issues.apache.org/bugzilla/show_bug.cgi?id=48566

           Summary: ImplicitTagLibraryInfo - not respecting JSP version
                    from tag file
           Product: Tomcat 6
           Version: 6.0.20
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: critical
          Priority: P2
         Component: Jasper
        AssignedTo: dev@tomcat.apache.org
        ReportedBy: error...@yahoo.com


I've created a tag file (XML style) on which I have a attribute on which I
enable deferral. I'm doing this on tomcat 6.0.20 started with Java6

Tag file looks something like:

<jsp:root  xmlns:jsp="http://java.sun.com/JSP/Page"; version="2.1" >
    <jsp:directive.tag language="java" pageEncoding="UTF-8" />
    <jsp:directive.attribute   name="userInformation" required="true" 
deferredValue="true" />
</jsp:root>

However, at compilation I get this: 

org.apache.jasper.JasperException: Invalid JSP version defined for tag file at
/WEB-INF/tags/userInfo.tag
    at
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
    at
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
    at
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)
    at
org.apache.jasper.compiler.TagFileProcessor$TagFileDirectiveVisitor.visit(TagFileProcessor.java:280)


If I go look at TagFileProcessor$TagFileDirectiveVisitor L280 , I see a call to
ImplicitTagLibraryInfo which will return the JSP version, and indeed, in my
case it returns 2.0, so the error is at least correct according to the spec
(the spec says it should throw an error is deferral is used pre 2.1)

Now, if I check ImplicitTagLibraryInfo why the version returned is 2.0, I see
that in the constructor of ImplicitTagLibraryInfo the version is initialized b
default at 2.1 (weird, since its 2.1 container, but anyway).
However, when further executing the constructor, it scans the files to see if
has to change the version.
But the problem is that this is only done in case of an IMPLICIT TLD:

ImplicitTagLibraryInfo-L115: } else if (path.endsWith(IMPLICIT_TLD)) {

So, in case of my tag file there is no implicit TLD and the else is never
executed leaving the version at 2.0

This seems incorrect, since my tag clearly indicates to be 2.1 and the JSP
version on tomcat is also 2.1 
Can this be fixed?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to