You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jay Rutten <ja...@kurant.com> on 2004/07/01 00:25:05 UTC

Using a suffix to access my webapp

I think I am missing something minor here, but I can not figure it out.

 

Running:

 

WinXP

IIS 5

JK2

Tomcat 5.0.19

 

I want to have the following request go through my Router application:
http://localhost/MyServlet.ss. Here is the relevant entry in
worker2.properties

 

[uri:/*.ss]

info=My Application--must match the configuration file.

 

Here are the relevant entries from web.xml (in
\tomcat5\webapps\MyApp\WEB-INF\web.xml):

 

<!-- Router declaration (for convenience only) -->

<servlet>

            <servlet-name>Router</servlet-name>

            <servlet-class>com.kurant.servlet.Router</servlet-class>

</servlet>

 

<!-- This will map all requests to Router (suffix mapping) -->

<servlet-mapping>

            <servlet-name>Router</servlet-name>

            <url-pattern>*.ss</url-pattern>

</servlet-mapping>

 

Here is the relevant entry from server.xml:

 

<Context className="org.apache.catalina.core.StandardContext"

                        docBase="MyApp"

                        displayName=" MyApp "

                        path=""

                        cookies="true"

 
charsetMapperClass="org.apache.catalina.util.CharsetMapper"

 
mapperClass="org.apache.catalina.core.StandardContextMapper"

                        swallowOutput="false"

                        reloadable="true">

            <Logger className="org.apache.catalina.logger.FileLogger"
debug="0"

                                    directory="logs"
prefix="localhost_router_log."

                                    suffix=".txt" timestamp="true"
verbosity="10"/>

</Context>

 

When I try to hit the URL above, I get that the resource is not available.
If I put the path above as MyApp, then http://localhost/MyApp/MyServlet.ss
works. Also, if I put my application in the ROOT, the original URL works, as
expected.

 

>>From what I read in the docs, setting path="" in my context should make this
the default context, but I never see the call to Router.

 

If you haven any suggestions, it would be greatly appreciated!