-
Couldn't load subscription status.
- Fork 278
Description
The ServletWarEntity obtains modification dates through a combination of ServletContext.getRealPath and File.lastModified. For containers which choose not to expose the real path (for security reasons, by configuration or because the resource remains packed within a WAR file) the modification date may still be available. For example, ServletContext.getResource in Tomcat may return a java.net.URL like jndi:/{hostname}/{warpath} which can be opened to obtain the modification date regardless of where the resource is stored.
If ServletWarEntity.getRepresentation was changed to use getResource either as a fall back to getRealPath or if it were used as an alternate to getResourceAsStream the modification date would be more likely to be available for use in caching decisions downstream.