You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2010/01/18 14:37:59 UTC
DO NOT REPLY [Bug 48566] New: ImplicitTagLibraryInfo - not
respecting JSP version from tag file
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: errorken@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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org
DO NOT REPLY [Bug 48566] ImplicitTagLibraryInfo - not respecting JSP
version from tag file
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48566
Mark Thomas <ma...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |INVALID
--- Comment #1 from Mark Thomas <ma...@apache.org> 2010-02-15 23:59:09 UTC ---
Short version:
The TLD determines the JSP version to be used.
The JSP version in the tag file must agree with the one in the TLD.
The default version for implicit.tld is 2.0
Long version:
Following the quotes from the JSP 2.1 spec:
>From the end of JSP.8.3:
If a tag file in XML syntax contains a jsp:root element, the value of that
element’s version attribute must match the tag file’s JSP version. See
Section JSP.8.4.2, “Packaging in a JAR”, and Section JSP.8.4.3, “Packaging
Directly in a Web Application”, for how the JSP version of a tag file is
determined.
In this case we need to look at JSP.8.4.3:
The JSP version of an implicit tag library defaults to 2.0.
The JSP version and tlib-version of an implicit tag library may be configured
by placing a TLD with the reserved name implicit.tld in the same directory as
the implicit tag library’s constituent tag files. A JSP 2.1 container must
consider only the JSP version and tlib-version specified by an implicit.tld
file, and ignore its short-name element.
--
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-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org