Bug 130145

Summary: XSLTemplate.isModified() does not work with Tomcat 4.0
Product: [Retired] Red Hat Web Application Framework Reporter: Carsten Clasohm <clasohm>
Component: otherAssignee: ccm-bugs-list
Status: CLOSED WONTFIX QA Contact: Jon Orris <jorris>
Severity: medium Docs Contact:
Priority: medium    
Version: nightly   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2006-07-12 09:10:07 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Carsten Clasohm 2004-08-17 14:30:00 UTC
Description of problem:
XSLTemplate.isModified() only supports URLs with protocol "file". With
Tomcat 4.0, ServletContext.getResource() returns a "jndi" URL for the
template, which causes isModified() to always return false. As a
result, XSL content is always read from the cache until the server is
restarted. This makes developing XSL extremely cumbersome.

Version-Release number of selected component (if applicable):
6.1

How reproducible:
Always.

Steps to Reproduce:
1. Set waf.debug to "true", and start the server with Tomcat 4.0.
2. Load a Bebop page.
3. Modify one of the XSL files used on this page.
3. Reload the Bebop page.
  
Actual results:
The reloaded Bebop page looks exactly the same, changes in the XSL are
ignored.

Expected results:
The XLS changes should be visible when the page is reloaded.

Additional info:
This does not happen with Resin, because its
ServletContext.getResource() returns "file" URLs.

I was unable to find a way to get a last modified date for JNDI URLs.
One fix would be for XSLTemplate.isModified() to always return "true"
for JNDI URLs. Since isModified() is only called when waf.debug is
set, the effect on performance can be neglected.

Comment 1 Carsten Clasohm 2006-07-12 09:10:07 UTC
Closing old tickets.