Bug 46047 - Issue when using include directive inside tag files that are inside jar files
Issue when using include directive inside tag files that are inside jar files
Status: RESOLVED FIXED
Product: Tomcat 6
Classification: Unclassified
Component: Jasper
6.0.18
PC Linux
: P2 critical (vote)
: default
Assigned To: Tomcat Developers Mailing List
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2008-10-21 02:20 UTC by Cédric Mailleux
Modified: 2008-11-30 15:07 UTC (History)
0 users



Attachments
patch for ParserController class (883 bytes, patch)
2008-10-21 02:20 UTC, Cédric Mailleux
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Cédric Mailleux 2008-10-21 02:20:44 UTC
Created attachment 22760 [details]
patch for ParserController class

When we use the include directive inside a tag file like :
<%@ tag body-content="empty" description="Renders a date control to query the creation date of a content object." %>

<%@include file="/META-INF/tags/search/declaration.tagf" %>

And that this tag file is inside a jar file, jasper has an issue dealing the dependencies by losing the fact that the included file is inside a jar file.

static {
    _jspx_dependants = new java.util.ArrayList(4);
    _jspx_dependants.add("/META-INF/tags/search/declaration.tagf");
    _jspx_dependants.add("/META-INF/tags/search/date.tagf");
    _jspx_dependants.add("jar:file:/home/rincevent/tools/apache-tomcat-6.0.18/webapps/jahia/WEB-INF/lib/jahia-taglib-6.0-SNAPSHOT.jar!/META-INF/search.tld");
    _jspx_dependants.add("jar:file:/home/rincevent/tools/apache-tomcat-6.0.18/webapps/jahia/WEB-INF/lib/jahia-taglib-6.0-SNAPSHOT.jar!/META-INF/tags/search/resultsPageUrl.tag");
  }

The other dependencies are handled correctly thanks to patch https://issues.apache.org/bugzilla/show_bug.cgi?id=43741 .

I propose a patch to ParserController so that when we detect that we are inside a jarFile we prepend the jarFileUrl to absFileName.

The patch has been made on the trunk source code of tomcat.
Comment 1 Mark Thomas 2008-11-03 14:53:23 UTC
This has been applied to trunk and proposed for 6.0.x. Many thanks for the patch.
Comment 2 Mark Thomas 2008-11-30 15:07:07 UTC
This has been fixed for 6.0.x and will be included in 6.0.19 onwards.