[
https://issues.apache.org/jira/browse/VELOCITY-302?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Henning Schmiedehausen closed VELOCITY-302.
-------------------------------------------
> VelocityViewServlet+ClasspathResourceLoader doesn't work with jars+Tomcat
> -------------------------------------------------------------------------
>
> Key: VELOCITY-302
> URL: https://issues.apache.org/jira/browse/VELOCITY-302
> Project: Velocity
> Issue Type: Bug
> Components: Engine
> Affects Versions: 1.4
> Environment: Operating System: other
> Platform: Other
> Reporter: Shinobu Kawai
> Assigned To: Velocity-Dev List
> Attachments: ClasspathResourceLoader.patch, VelocityViewServlet.patch
>
>
> When you configure VelocityViewServlet to use ClasspathResourceLoader, it
> fails
> to load templates in jar files on Tomcat.
> VelocityViewServlet tries to load templates with a "/" leading the path,
> while
> java.util.jar.JarFile#getJarEntry() returns null for such value. In order to
> make this work, the leading "/" must be trimmed.
> There are two places for a possible fix:
> 1. VelocityViewServlet#handleRequest()
> 2. ClasspathResourceLoader#getResourceStream()
> I don't know which is the right fix, but I'll post patches for both.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]