cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robin Green" <gree...@hotmail.com>
Subject Re: Cocoon with Tomcat, part (n+1) ...
Date Sat, 06 May 2000 19:17:53 GMT
Mark Washeim <esalon@canuck.com> wrote:
>Oh brother. Ok, finally, i followed my nose and put the proper Cocoon.java
>back in place and modified the my tomcat setup such that:
>
>/path/to/webapps/cocoon/WEB-INF/web.xml
>
>looked like
>
><web-app>
>
>    <servlet>
>         <servlet-name>
>             org.apache.cocoon.Cocoon
>         </servlet-name>
>         <servlet-class>
>             org.apache.cocoon.Cocoon
>         </servlet-class>
>         <init-param>
>             <param-name>
>                  properties
>             </param-name>
>             <param-value>
>                 cocoon.properties
>             </param-value>
>         </init-param>
>     </servlet>
>         <servlet-mapping>
>         <servlet-name>
>             org.apache.cocoon.Cocoon
>         </servlet-name>
>         <url-pattern>
>             *.xml
>         </url-pattern>
>     </servlet-mapping>
></web-app>
>
>where cocoon.properties is located as follows:
>/path/to/webapps/cocoon/WEB-INF/cocoon.properties
>
>Works.
>
>Mark
>
>on 6/5/00 7:38 pm, Mark Washeim at esalon@canuck.com wrote:
>
> > This is further to my last mail:
> >
> > I did a simple test to see if the resource method for obtaining the conf
> > file was a problem. I simply edited Cocoon.java and hardcoded the URL:
> >
> > //URL resource = config.getServletContext().getResource(confsName);
> > URL resource = new URL ("http://localhost/cocoon/cocoon.properties");
> >
> > And that, worked. To reiterate, my tomcat setup:
> >
> > SERVER INFO: Tomcat Web Server/3.1 Beta (JSP 1.1; Servlet 2.2; Java 
>1.1.8;
> > Mac OS 9.4 PowerPC; java.vendor=Apple Computer, Inc.)
> >
> >
>


I'm unable to reproduce that solution on Tomcat 3.1 final. I can only get it 
to work with

[snip]
<init-param>
  <param-name>properties</param-name>
  <param-value>
    /WEB-INF/cocoon.properties
  </param-value>
</init-param>
[snip]

Your solution should be considered unreliable I think, because it is not 
conformant to the Servlet spec, in the sense that Cocoon now uses 
ServletContext.getResource () to find its properties (see my documentation 
patch in my next email), but the Servlet API says:

---------------------------------
Returns a URL to the resource that is mapped to a specified path. The path 
must begin with a "/" and is interpreted as relative to the current context 
root.
---------------------------------

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


Mime
View raw message