geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Woldrich <d...@woldrich.com>
Subject Re: Catch-All App
Date Tue, 23 Jan 2007 01:41:27 GMT
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
>
>
>
>   


Mime
View raw message