The CodebehindUnknownHandler will search for results using:
 ServletContext.getResource(path); then if not found
 ClassLoaderUtils.getResource(path, getClass())

The path always has a leading slash which is mandatory for the ServletContext call. However under some(?) conditions ClassLoaderUtils fails to find resources located on the classpath within jars when it includes the leading slash. eg. if a resource in a webapp is at URI "jar:file:/pathtojar/jarfile.jar!/results/success.ftl", then
ClassLoaderUtils.getResource("/results/success.ftl", getClass()) fails, but
ClassLoaderUtils.getResource("results/success.ftl", getClass()) succeeds (but is NOT used by CodebehindUnknownHandler).

After googling much misinformation I've gotten myself all confused about the role of the leading slash. Anyone have an explanation? I'm not sure whether I have a local problem, whether Codebehind should test for both cases, or whether CodeBehind is broken and has always failed to find results in jars.

[Environment: tomcat:5.5.25.0, jvm:1.5.0_13-b05, os: linux 2.6.22-14-generic]

Thanks,
Jeromy Evans

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to