geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pc3 <peter.r.cl...@gmail.com>
Subject Re: Catch-All App
Date Mon, 05 Feb 2007 15:06:43 GMT

What about just configuring a "global" 404 handler to direct to my JSP... but
I can't find where to configure a server-wide 404 handler. running
geronimo/tomcat




David Woldrich wrote:
> 
> For my app, using deploy.bat, I removed the default app that ships with 
> Geronimo that squats on the context root at /.  And then in my app, I 
> set the context root set at /.  I suppose you could have a servlet that 
> just matches on * and then it would match everything at your context 
> root ...
> 
> I'm just making up the following, haven't tested it or anything, YMMV.
> 
> In your WAR, web.xml:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <web-app id="MyWebApp" version="2.4" 
> xmlns="http://java.sun.com/xml/ns/j2ee" 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
> http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
>     <display-name>My WebApp</display-name>
>     <servlet>
>         <description>MyServlet serves up everything!</description>
>         <display-name>MyServlet</display-name>
>         <servlet-name>MyServlet</servlet-name>
>         <servlet-class>com.woldrich.MyServlet</servlet-class>
>     </servlet>
>     <servlet-mapping>
>         <servlet-name>MyServlet</servlet-name>
>         <url-pattern>/*</url-pattern>
>     </servlet-mapping>
> </web-app>
> 
> Then in the EAR that contains the WAR, application.xml:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <application id="MyApp" version="1.4" 
> xmlns="http://java.sun.com/xml/ns/j2ee" 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
> xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee 
> http://java.sun.com/xml/ns/j2ee/application_1_4.xsd">
>     <display-name>MyApp</display-name>
>     <module id="WebModule_1100120000968">
>         <web>
>             <web-uri>MyWebApp.war</web-uri>
>             <context-root>/</context-root>
>         </web>
>     </module>
> </application>
> 
> Cheers,
> Dave Woldrich
> http://cardmeeting.com
> 
> pc3 wrote:
>> Thanks.. but yeah, we have tomcat 5.5.15 running w/ gero
>>
>> Does anyone know how to do it with tc?
>> Pete
>>
>>
>>
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Catch-All-App-tf3059593.html#a8807910
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.


Mime
View raw message