I have the same situation. It works only within tomcat, but not
apache/tomcat. 
However, if you use some prefix before /servlets, it works.  For example,
create context /mytest in server.xml. Change prefix to "/servlets/".  I am
not quite sure if I need to have web.xml under /mytest/WEB-INF to include
<url-pattern> /servlets.

I included mod_jk.conf-local in httpd.conf in which I can configure the
alias /mytest and JkMount /mytest/servlets/*. 
I am not quite sure if this is necessary, since I have played with it for a
while.
I can make http://ourserver/mytest/servlets/ServletTest (apache server) or
           http://ourserver:8090/servlets/ServletTest (tomcat server) work, 
but I cannot make http://ourserver/servlets/ServletTest work, 
which is what we need.   Does anybody have some good ideas about this
problem?
Thanks for any information!

Alice

Xiaobu Alice Lian
[EMAIL PROTECTED]
(484)397-2583 

-----Original Message-----
From: CPC Livelink Admin [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 23, 2001 9:46 AM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: RE: Problem mapping servlets to /servlets/*



>From the 3.2.1 server.xml
        <!-- Non-standard invoker, for backward compat. ( /servlet/* )
             You can modify the prefix that is matched by adjusting the
             "prefix" parameter below.  Be sure your modified pattern
             starts and ends with a slash.

             NOTE:  This prefix applies to *all* web applications that
             are running in this instance of Tomcat.
          -->
        <RequestInterceptor
            className="org.apache.tomcat.request.InvokerInterceptor"
            debug="0" prefix="/servlet/" />

So to add /servlets, you would need something like this in your server.xml :
        <RequestInterceptor
            className="org.apache.tomcat.request.InvokerInterceptor"
            debug="0" prefix="/servlets/" />


-----Original Message-----
From: Diego Castillo [mailto:[EMAIL PROTECTED]]
Sent: Monday, April 23, 2001 9:42 AM
To: [EMAIL PROTECTED]
Subject: Problem mapping servlets to /servlets/*


Hi,

I am quite new to Tomcat and I have encountered problems in mapping servlets
to specific URLs. Basically, I want my servlets to be activated when invoked
through an URL that contains /servlets/* in addition to default /servlet/*.

I have added the following to my %TOMCAT_HOME%\conf\web.xml:

<web-app>
    [...]
    <servlet-mapping>
        <servlet-name>
            invoker
        </servlet-name>
        <url-pattern>
            /servlets/*
        </url-pattern>
    </servlet-mapping>
    [...]
</web-app>

This does not work. If I point to http://localhost/servlets/IsItWorking
instead of http://localhost/servlet/IsItWorking, Apache is not able to find
the appropriate page.

Any suggestions?

Regards,


Diego Castillo

Reply via email to