Bug 53654

Summary: JSP file is always recompiled for using file based TLD URL
Product: Tomcat 7 Reporter: Ivan <xhhsld>
Component: JasperAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal    
Priority: P2    
Version: 7.0.29   
Target Milestone: ---   
Hardware: PC   
OS: All   
Attachments: handle file:/

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.