Bug 53654 - JSP file is always recompiled for using file based TLD URL
Summary: JSP file is always recompiled for using file based TLD URL
Alias: None
Product: Tomcat 7
Classification: Unclassified
Component: Jasper (show other bugs)
Version: 7.0.29
Hardware: PC All
: P2 normal (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
Depends on:
Reported: 2012-08-05 14:47 UTC by Ivan
Modified: 2012-08-15 16:04 UTC (History)
0 users

handle file:/ (644 bytes, patch)
2012-08-06 09:12 UTC, viola.lu
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan 2012-08-05 14:47:43 UTC
Now, in Jasper codes, it only supports jar URL and relative URL, that may be enough for common web applications. While, it is possible that the third-party uses other protocol URL, like file: protocol based URL. So, the JSP files will be always recompiled for each access for the target page.
The codes are located in Compiler.isOutDated() method.
Is it possible to provide more generic handlering for the URL ?
Comment 1 Konstantin Kolinko 2012-08-05 15:11:41 UTC
It is hard to understand your description.

Please provide the following:
1. Small simple web application that demonstrates the issue.
2. Step-by-step instructions to reproduce the issue.
Describe what you are observing and what you are expecting.
Comment 2 viola.lu 2012-08-06 09:12:15 UTC
Created attachment 29169 [details]
handle file:/

Pls review the patch
Comment 3 viola.lu 2012-08-06 09:19:00 UTC
Now compile only handles taglib jar file as jar:/file:/***.jar!/META-INF/taglib.tld or /WEB-INF/taglib.tld, but if tag lib file exists as expanded folder for example: file:/***.jar/META-INF/taglib.tld, Compiler.isOutDated() will return true and compile jsp always. So provide this patch to make it can handle file:/ URL also
Comment 4 Mark Thomas 2012-08-15 16:04:22 UTC
Thanks for the patch. It has been applied to trunk and 7.0.x and will be included in 7.0.30 onwards.