You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@jakarta.apache.org by Kevin Jones <ke...@develop.com> on 2000/01/18 22:53:14 UTC
Help with Cocoon setup
Does anyone have a web.xml file for cocoon that works?
I'm trying to specify the location of cocoon.properties but the servlet
isn't finding the file
Kevin Jones
DevelopMentor
RE: Help with Cocoon setup
Posted by Kevin Jones <ke...@develop.com>.
Thanks Lars,
I'm using Tomcat 3.1 (M1 RC1) and have just upgraded to Cocoon 1.6 and it
now all works. One question though, in my web.xml file, if I set the
<servlet-name> to anything other than org.apache.cocoon.Cocoon then
initialisation fails (so if I have <servlet-name>Cocoon</servlet-name> for
example.
Other servlets have exactly the same behaviour - they get loaded OK but
don't have access to their initialisation parameters - is this a 'feature'
of tomcat? The 2.2 spec. doesn't say that the servlet-name and servelt-class
have to be the same.
Kevin Jones
DevelopMentor
> -----Original Message-----
> From: lars [mailto:lars]On Behalf Of Lars Hofhansl
> Sent: 19 January 2000 01:21
> To: general@jakarta.apache.org
> Subject: Re: Help with Cocoon setup
>
>
> Kevin Jones wrote:
> >
> > Does anyone have a web.xml file for cocoon that works?
> >
> > I'm trying to specify the location of cocoon.properties but the servlet
> > isn't finding the file
> >
> > Kevin Jones
> > DevelopMentor
>
> Hi Kevin,
>
> here're the steps that made cocoon work for me:
>
> 1. Tomcat 3.0 needs a patch in order to "calculate" the right
> servletpath. This patch (RequestMapper.java) can be found in CVS
> but I'll attach it anyway... (All others please bear with me.)
>
> 2. I had to patch Cocoon 1.5. Apply the patch to
> src/org/apache/cocoon/producer/FileProducer.java (or
> better, make the change by quickly by hand).
>
> 3. You need to write your web.xml file... I'll attach that also.
>
> 4. Make sure the Cocoon jars are available to Tomcat. Either put
> them in your classpath or in WEB-INF/lib (personally I just made
> lib a link to Cocoons bin directory...)
> (in order for the lib directory to work you need to patch tomcat
> see my other posting on "Automagic loading of WEB-INF/lib???".
>
> 5. recompile Cocoon and Tomcat.
>
> That's it...
>
> Lars
>
>
Re: Help with Cocoon setup
Posted by Lars Hofhansl <lh...@poet.com>.
Kevin Jones wrote:
>
> Does anyone have a web.xml file for cocoon that works?
>
> I'm trying to specify the location of cocoon.properties but the servlet
> isn't finding the file
>
> Kevin Jones
> DevelopMentor
Hi Kevin,
here're the steps that made cocoon work for me:
1. Tomcat 3.0 needs a patch in order to "calculate" the right
servletpath. This patch (RequestMapper.java) can be found in CVS
but I'll attach it anyway... (All others please bear with me.)
2. I had to patch Cocoon 1.5. Apply the patch to
src/org/apache/cocoon/producer/FileProducer.java (or
better, make the change by quickly by hand).
3. You need to write your web.xml file... I'll attach that also.
4. Make sure the Cocoon jars are available to Tomcat. Either put
them in your classpath or in WEB-INF/lib (personally I just made
lib a link to Cocoons bin directory...)
(in order for the lib directory to work you need to patch tomcat
see my other posting on "Automagic loading of WEB-INF/lib???".
5. recompile Cocoon and Tomcat.
That's it...
Lars