Red Hat Bugzilla – Bug 130145
XSLTemplate.isModified() does not work with Tomcat 4.0
Last modified: 2007-04-18 13:10:31 EDT
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):
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.
The reloaded Bebop page looks exactly the same, changes in the XSL are
The XLS changes should be visible when the page is reloaded.
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.
Closing old tickets.