cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vadim Gritsenko <va...@reverycodes.com>
Subject Re: Question about the best way to locate the path to WEB-INF
Date Thu, 21 Oct 2004 14:00:16 GMT
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

Mime
View raw message