Butler, Mark H (Labs Bristol) wrote:
> Hi team,
>
> I need your advice on the best way to fix a problem when using Cocoon on
> Tomcat caused by DELI that I do not encounter when running Cocoon on
> Jetty. Therefore I would like your advice as solving the problem seems
> to require an understanding of the differences between servlet engines
> that I'm afraid I do not possess. Patrick Melo has reported this
> exception:
>
> java.net.MalformedURLException: Path
> \\server\share\webappname\webappname\WEB-INF/deli/config/deliConfig.xml
> does not start with a "/" character
> java.net.MalformedURLException: Path
> \\server\share\webappname\webappname\WEB-INF/deli/config/deliConfig.xml
> does not start with a "/" character
> at
> org.apache.catalina.core.ApplicationContext.getResource(ApplicationConte
> xt.java:469)
> at
> org.apache.catalina.core.ApplicationContextFacade.getResource(Applicatio
> nContextFacade.java:176)
> at
> org.apache.cocoon.environment.http.HttpContext.getResource(HttpContext.j
> ava:99)
> at
> org.apache.cocoon.components.deli.DeliImpl$CocoonServletContext.getResou
> rce(DeliImpl.java:254)
The path which is passed into the servletContext.getResource must be relative
path to the webapp context root. In this example, path must be:
/WEB-INF/deli/config/deliConfig.xml
See
http://java.sun.com/j2ee/sdk_1.3/techdocs/api/javax/servlet/ServletContext.html#getResource(java.lang.String)
Vadim
|