cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florent Soulière <fsouli...@soleri.com>
Subject Re: Merging Cocoon2 and a webapp, same context
Date Tue, 05 Mar 2002 12:40:53 GMT
I found it! Here is the workaround. I hope this will help other developers:
In the WEB-INF/web.xml file of the application, use the following in the 
servlet-mapping section: the URL-pattern must be "/cocoon/*" instead of 
"/cocoon". You can also replace the word "cocoon" by anything else you want.

Have fun, and tell me if I am wrong...

At 13:26 05/03/02 +0100, you wrote:
>Florent Soulière wrote:
>
>>OK, I have news with my problem: http://localhost:8080/examples/cocoon 
>>works fine, actually, but every other URL in the form 
>>http://localhost:8080/examples/cocoon/foobar seems to be resolved by 
>>Tomcat instead of Cocoon with its sitemap!!! So for every request I get 
>>"Apache Tomcat/4.0.1 - HTTP Status 404".
>>How can I force Cocoon resolving in place of Tomcat's???
>>I thought that a servlet mapping with the URI "/cocoon" was enough... but 
>>apparently not!
>
>You need an explicit rule in the sitemap that matches completely the 
>substring of the URL that is after the context name.
>Something like
><map:match pattern="**">
><map:read src="{0}" type="text/html/>
><map:match>
>
>For that you will probably use wildcards (* and **).
>Have a look at the default sitemap for an explanation.
>
>
>---------------------------------------------------------------------
>Please check that your question has not already been answered in the
>FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
>To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
>For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message