You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Flaffer <be...@gmail.com> on 2005/01/27 18:37:22 UTC

Invoker workaround on AIX

I am migrating around 10 apps from Tomcat 4.0.6 (Sun JDK 1.3.1) to
Tomcat 4.0.6 on AIX 5.2 using IBMs JDK 1.3.1sr7).

I am having an issue working around the invoker servlet. I have the
workaround(where you explicitely map the /servlet context ) working on
Solaris. But when I bring the config over to AIX, the URI  "/servlet"
cannot be mapped to a context.

Here are the two configs. The first one does not work. It throws this
error in the engine log:

2005-01-27 10:20:39 StandardHost[pdw0stl5]: Mapping request URI
'/servlet/com.bo.hsal.servlet'
2005-01-27 10:20:39 StandardHost[pdw0stl5]:   Trying the longest
context path prefix
2005-01-27 10:20:39 StandardHost[pdw0stl5]:   Trying the default context
2005-01-27 10:20:39 StandardHost[pdw0stl5]: MAPPING configuration
error for request URI

The access log shows a 500 error thrown on the request. Here is the
pertinent part of the web.xml for the application server instance
(i.e., conf/web.xml):

<?xml version="1.0" encoding="ISO-8859-1" ?>
 <!DOCTYPE web-app (View Source for full doctype...)>
<web-app>
<servlet>
 <servlet-name>default</servlet-name>
 <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
<init-param>
 <param-name>debug</param-name>
 <param-value>0</param-value>
 </init-param>
<init-param>
 <param-name>listings</param-name>
 <param-value>false</param-value>
 </init-param>
 <load-on-startup>1</load-on-startup>
 </servlet>

- <!--  Mapping to replace Invoker servlet. NOTE: USED ONLY BY BO APPS.
 -->
<!--  LEAVE COMMENTED OUT FOR OTHER APPS. This addresses a securty concern.
 -->
<!--  See http://marc.theaimsgroup.com/?l=tomcat-user&m=103945394724196&w=2
 -->

<servlet>
 <servlet-name>servlet</servlet-name>
 <servlet-class>com.bo.hsal.HSALServlet</servlet-class>
 </servlet>

<servlet>
 <servlet-name>jsp</servlet-name>
 <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
<init-param>
 <param-name>logVerbosityLevel</param-name>
 <param-value>WARNING</param-value>
 </init-param>
 <load-on-startup>3</load-on-startup>
 </servlet>

<!--  ================ Built In Servlet Mappings =========================
 -->
<servlet-mapping>
 <servlet-name>default</servlet-name>
 <url-pattern>/</url-pattern>
 </servlet-mapping>

<!--  Uncomment for BO Apps Only. See Invoker replacement above.
 -->

<servlet-mapping>
 <servlet-name>servlet</servlet-name>
 <url-pattern>/servlet/*</url-pattern>
 </servlet-mapping>

<servlet-mapping>
 <servlet-name>jsp</servlet-name>
 <url-pattern>*.jsp</url-pattern>
 </servlet-mapping>

The config that works is the default one which loads the invoker
servlet and maps it.

<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE web-app
   PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
   "http://java.sun.com/dtd/web-app_2_3.dtd">

<web-app>

 <servlet>
   <servlet-name>default</servlet-name>
   <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
   <init-param>
     <param-name>debug</param-name>
     <param-value>0</param-value>
   </init-param>
   <init-param>
     <param-name>listings</param-name>
     <param-value>false</param-value>
   </init-param>
   <load-on-startup>1</load-on-startup>
 </servlet>

<servlet>
   <servlet-name>invoker</servlet-name>
   <servlet-class>org.apache.catalina.servlets.InvokerServlet</servlet-class>
   <init-param>
     <param-name>debug</param-name>
     <param-value>0</param-value>
   </init-param>
   <load-on-startup>2</load-on-startup>
 </servlet>

 <servlet>
   <servlet-name>jsp</servlet-name>
   <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
   <init-param>
     <param-name>logVerbosityLevel</param-name>
     <param-value>WARNING</param-value>
   </init-param>
   <load-on-startup>3</load-on-startup>
 </servlet>

 <!-- ================ Built In Servlet Mappings ========================= -->

 <servlet-mapping>
   <servlet-name>default</servlet-name>
   <url-pattern>/</url-pattern>
 </servlet-mapping>

 <!-- The mapping for the invoker servlet -->

 <servlet-mapping>
   <servlet-name>invoker</servlet-name>
   <url-pattern>/servlet/*</url-pattern>
 </servlet-mapping>

Any ideas?

-- 
Ben Ricker
He's just this guy, you know?

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Invoker workaround on AIX

Posted by K thiruthuvadas <td...@yahoo.com>.
Dear Ben,
Just check the servlet mapping package separator that
you have implemented it in AIX and Solaris.

regards,
Das
--- Flaffer <be...@gmail.com> wrote:

> I added the mapping to the web.xml of the app and it
> made no
> difference. For some reason, it seems to ignore the
> mapping
> completely! I have no idea why it works on Solaris
> but not on AIX!
> 
> Ben Ricker
> 
> On Thu, 27 Jan 2005 22:45:02 -0500, Parsons
> Technical Services
> <pa...@earthlink.net> wrote:
> > I have not worked with TC4 but I think your
> problem is that the mappings for
> > the servlets should be in the web.xml for the app
> and not in the general
> > web.xml. Also when you do the mappings in the app
> web.xml you do not need
> > fully qualified paths.
> > 
> > Doug
> > 
> > ----- Original Message -----
> > From: "Flaffer" <be...@gmail.com>
> > To: <to...@jakarta.apache.org>
> > Sent: Thursday, January 27, 2005 12:37 PM
> > Subject: Invoker workaround on AIX
> > 
> > >I am migrating around 10 apps from Tomcat 4.0.6
> (Sun JDK 1.3.1) to
> > > Tomcat 4.0.6 on AIX 5.2 using IBMs JDK
> 1.3.1sr7).
> > >
> > > I am having an issue working around the invoker
> servlet. I have the
> > > workaround(where you explicitely map the
> /servlet context ) working on
> > > Solaris. But when I bring the config over to
> AIX, the URI  "/servlet"
> > > cannot be mapped to a context.
> > >
> > > Here are the two configs. The first one does not
> work. It throws this
> > > error in the engine log:
> > >
> > > 2005-01-27 10:20:39 StandardHost[pdw0stl5]:
> Mapping request URI
> > > '/servlet/com.bo.hsal.servlet'
> > > 2005-01-27 10:20:39 StandardHost[pdw0stl5]:  
> Trying the longest
> > > context path prefix
> > > 2005-01-27 10:20:39 StandardHost[pdw0stl5]:  
> Trying the default context
> > > 2005-01-27 10:20:39 StandardHost[pdw0stl5]:
> MAPPING configuration
> > > error for request URI
> > >
> > > The access log shows a 500 error thrown on the
> request. Here is the
> > > pertinent part of the web.xml for the
> application server instance
> > > (i.e., conf/web.xml):
> > >
> > > <?xml version="1.0" encoding="ISO-8859-1" ?>
> > > <!DOCTYPE web-app (View Source for full
> doctype...)>
> > > <web-app>
> > > <servlet>
> > > <servlet-name>default</servlet-name>
> > >
>
<servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
> > > <init-param>
> > > <param-name>debug</param-name>
> > > <param-value>0</param-value>
> > > </init-param>
> > > <init-param>
> > > <param-name>listings</param-name>
> > > <param-value>false</param-value>
> > > </init-param>
> > > <load-on-startup>1</load-on-startup>
> > > </servlet>
> > >
> > > - <!--  Mapping to replace Invoker servlet.
> NOTE: USED ONLY BY BO APPS.
> > > -->
> > > <!--  LEAVE COMMENTED OUT FOR OTHER APPS. This
> addresses a securty
> > > concern.
> > > -->
> > > <!--  See
> > >
>
http://marc.theaimsgroup.com/?l=tomcat-user&m=103945394724196&w=2
> > > -->
> > >
> > > <servlet>
> > > <servlet-name>servlet</servlet-name>
> > >
>
<servlet-class>com.bo.hsal.HSALServlet</servlet-class>
> > > </servlet>
> > >
> > > <servlet>
> > > <servlet-name>jsp</servlet-name>
> > >
>
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
> > > <init-param>
> > > <param-name>logVerbosityLevel</param-name>
> > > <param-value>WARNING</param-value>
> > > </init-param>
> > > <load-on-startup>3</load-on-startup>
> > > </servlet>
> > >
> > > <!--  ================ Built In Servlet Mappings
> =========================
> > > -->
> > > <servlet-mapping>
> > > <servlet-name>default</servlet-name>
> > > <url-pattern>/</url-pattern>
> > > </servlet-mapping>
> > >
> > > <!--  Uncomment for BO Apps Only. See Invoker
> replacement above.
> > > -->
> > >
> > > <servlet-mapping>
> > > <servlet-name>servlet</servlet-name>
> > > <url-pattern>/servlet/*</url-pattern>
> > > </servlet-mapping>
> > >
> > > <servlet-mapping>
> > > <servlet-name>jsp</servlet-name>
> > > <url-pattern>*.jsp</url-pattern>
> > > </servlet-mapping>
> > >
> > > The config that works is the default one which
> loads the invoker
> > > servlet and maps it.
> > >
> > > <?xml version="1.0" encoding="ISO-8859-1"?>
> > >
> > > <!DOCTYPE web-app
> > >   PUBLIC "-//Sun Microsystems, Inc.//DTD Web
> Application 2.3//EN"
> > >   "http://java.sun.com/dtd/web-app_2_3.dtd">
> > >
> > > <web-app>
> > >
> > > <servlet>
> > >   <servlet-name>default</servlet-name>
> > >
> > >
>
<servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
> > >   <init-param>
> > >     <param-name>debug</param-name>
> > >     <param-value>0</param-value>
> > >   </init-param>
> > >   <init-param>
> > >     <param-name>listings</param-name>
> > >     <param-value>false</param-value>
> > >   </init-param>
> > >   <load-on-startup>1</load-on-startup>
> > > </servlet>
> > >
> > > <servlet>
> > >   <servlet-name>invoker</servlet-name>
> > >
> > >
>
<servlet-class>org.apache.catalina.servlets.InvokerServlet</servlet-class>
> > >   <init-param>
> > >     <param-name>debug</param-name>
> > >     <param-value>0</param-value>
> > >   </init-param>
> > >   <load-on-startup>2</load-on-startup>
> > > </servlet>
> > >
> > > <servlet>
> > >   <servlet-name>jsp</servlet-name>
> > >  
>
<servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
> > >   <init-param>
> > >     <param-name>logVerbosityLevel</param-name>
> > >     <param-value>WARNING</param-value>
> > >   </init-param>
> > >   <load-on-startup>3</load-on-startup>
> > > </servlet>
> > >
> > > <!-- ================ Built In Servlet Mappings
> > > ========================= -->
> > >
> > > <servlet-mapping>
> > >   <servlet-name>default</servlet-name>
> > >   <url-pattern>/</url-pattern>
> > > </servlet-mapping>
> > >
> > > <!-- The mapping for the invoker servlet -->
> > >
> > > <servlet-mapping>
> > >   <servlet-name>invoker</servlet-name>
> > >   <url-pattern>/servlet/*</url-pattern>
> > > </servlet-mapping>
> > >
> > > Any ideas?
> 
=== message truncated ===



		
__________________________________ 
Do you Yahoo!? 
All your favorites on one personal page � Try My Yahoo!
http://my.yahoo.com 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Invoker workaround on AIX

Posted by Flaffer <be...@gmail.com>.
I added the mapping to the web.xml of the app and it made no
difference. For some reason, it seems to ignore the mapping
completely! I have no idea why it works on Solaris but not on AIX!

Ben Ricker

On Thu, 27 Jan 2005 22:45:02 -0500, Parsons Technical Services
<pa...@earthlink.net> wrote:
> I have not worked with TC4 but I think your problem is that the mappings for
> the servlets should be in the web.xml for the app and not in the general
> web.xml. Also when you do the mappings in the app web.xml you do not need
> fully qualified paths.
> 
> Doug
> 
> ----- Original Message -----
> From: "Flaffer" <be...@gmail.com>
> To: <to...@jakarta.apache.org>
> Sent: Thursday, January 27, 2005 12:37 PM
> Subject: Invoker workaround on AIX
> 
> >I am migrating around 10 apps from Tomcat 4.0.6 (Sun JDK 1.3.1) to
> > Tomcat 4.0.6 on AIX 5.2 using IBMs JDK 1.3.1sr7).
> >
> > I am having an issue working around the invoker servlet. I have the
> > workaround(where you explicitely map the /servlet context ) working on
> > Solaris. But when I bring the config over to AIX, the URI  "/servlet"
> > cannot be mapped to a context.
> >
> > Here are the two configs. The first one does not work. It throws this
> > error in the engine log:
> >
> > 2005-01-27 10:20:39 StandardHost[pdw0stl5]: Mapping request URI
> > '/servlet/com.bo.hsal.servlet'
> > 2005-01-27 10:20:39 StandardHost[pdw0stl5]:   Trying the longest
> > context path prefix
> > 2005-01-27 10:20:39 StandardHost[pdw0stl5]:   Trying the default context
> > 2005-01-27 10:20:39 StandardHost[pdw0stl5]: MAPPING configuration
> > error for request URI
> >
> > The access log shows a 500 error thrown on the request. Here is the
> > pertinent part of the web.xml for the application server instance
> > (i.e., conf/web.xml):
> >
> > <?xml version="1.0" encoding="ISO-8859-1" ?>
> > <!DOCTYPE web-app (View Source for full doctype...)>
> > <web-app>
> > <servlet>
> > <servlet-name>default</servlet-name>
> > <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
> > <init-param>
> > <param-name>debug</param-name>
> > <param-value>0</param-value>
> > </init-param>
> > <init-param>
> > <param-name>listings</param-name>
> > <param-value>false</param-value>
> > </init-param>
> > <load-on-startup>1</load-on-startup>
> > </servlet>
> >
> > - <!--  Mapping to replace Invoker servlet. NOTE: USED ONLY BY BO APPS.
> > -->
> > <!--  LEAVE COMMENTED OUT FOR OTHER APPS. This addresses a securty
> > concern.
> > -->
> > <!--  See
> > http://marc.theaimsgroup.com/?l=tomcat-user&m=103945394724196&w=2
> > -->
> >
> > <servlet>
> > <servlet-name>servlet</servlet-name>
> > <servlet-class>com.bo.hsal.HSALServlet</servlet-class>
> > </servlet>
> >
> > <servlet>
> > <servlet-name>jsp</servlet-name>
> > <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
> > <init-param>
> > <param-name>logVerbosityLevel</param-name>
> > <param-value>WARNING</param-value>
> > </init-param>
> > <load-on-startup>3</load-on-startup>
> > </servlet>
> >
> > <!--  ================ Built In Servlet Mappings =========================
> > -->
> > <servlet-mapping>
> > <servlet-name>default</servlet-name>
> > <url-pattern>/</url-pattern>
> > </servlet-mapping>
> >
> > <!--  Uncomment for BO Apps Only. See Invoker replacement above.
> > -->
> >
> > <servlet-mapping>
> > <servlet-name>servlet</servlet-name>
> > <url-pattern>/servlet/*</url-pattern>
> > </servlet-mapping>
> >
> > <servlet-mapping>
> > <servlet-name>jsp</servlet-name>
> > <url-pattern>*.jsp</url-pattern>
> > </servlet-mapping>
> >
> > The config that works is the default one which loads the invoker
> > servlet and maps it.
> >
> > <?xml version="1.0" encoding="ISO-8859-1"?>
> >
> > <!DOCTYPE web-app
> >   PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
> >   "http://java.sun.com/dtd/web-app_2_3.dtd">
> >
> > <web-app>
> >
> > <servlet>
> >   <servlet-name>default</servlet-name>
> >
> > <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
> >   <init-param>
> >     <param-name>debug</param-name>
> >     <param-value>0</param-value>
> >   </init-param>
> >   <init-param>
> >     <param-name>listings</param-name>
> >     <param-value>false</param-value>
> >   </init-param>
> >   <load-on-startup>1</load-on-startup>
> > </servlet>
> >
> > <servlet>
> >   <servlet-name>invoker</servlet-name>
> >
> > <servlet-class>org.apache.catalina.servlets.InvokerServlet</servlet-class>
> >   <init-param>
> >     <param-name>debug</param-name>
> >     <param-value>0</param-value>
> >   </init-param>
> >   <load-on-startup>2</load-on-startup>
> > </servlet>
> >
> > <servlet>
> >   <servlet-name>jsp</servlet-name>
> >   <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
> >   <init-param>
> >     <param-name>logVerbosityLevel</param-name>
> >     <param-value>WARNING</param-value>
> >   </init-param>
> >   <load-on-startup>3</load-on-startup>
> > </servlet>
> >
> > <!-- ================ Built In Servlet Mappings
> > ========================= -->
> >
> > <servlet-mapping>
> >   <servlet-name>default</servlet-name>
> >   <url-pattern>/</url-pattern>
> > </servlet-mapping>
> >
> > <!-- The mapping for the invoker servlet -->
> >
> > <servlet-mapping>
> >   <servlet-name>invoker</servlet-name>
> >   <url-pattern>/servlet/*</url-pattern>
> > </servlet-mapping>
> >
> > Any ideas?
> >
> > --
> > Ben Ricker
> > He's just this guy, you know?
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> >
> >
> >
> 
> 


-- 
Ben Ricker
He's just this guy, you know?

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Invoker workaround on AIX

Posted by Parsons Technical Services <pa...@earthlink.net>.

> Let me float the problem by you. Maybe I am overlooking something in
> the config. We have a hard coded URI that goes
> "/servlet/com.bo.hsal.HSALServlet?foo" (it is in 3rd party software
> that we do not have the source for). With the invoker taken out, any
> call to /servlet fails because it cannot find a context (with the
> invoker in the config, it finds it in the "default context").
>
> What combination of <servlet> and <servlet-mapping> would you use in
> the web.xml?


In the web.xml of the app:

    <servlet>
        <servlet-name>hsalServlet</servlet-name>
        <display-name>Stubborn</display-name>
        <servlet-class>com.bo.hsal.HSALServlet</servlet-class>
    </servlet>



    <servlet-mapping>
        <servlet-name>hsalServlet</servlet-name>
        <url-pattern>/hsalServlet</url-pattern>
    </servlet-mapping>


http://www.unknown.com/appname/hsalServlet

should respond.

To get

http://www.unknown.com/appname

set

    <servlet-mapping>
        <servlet-name>hsalServlet</servlet-name>
        <url-pattern>/</url-pattern>
    </servlet-mapping>

To get

http://www.unknown.com

set the app as the default app in the context with the above servlet 
mapping.

Please note these are my best guess. If I have foo barred somewhere 
hopefully someone will jump in and correct me.

Doug





---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Invoker workaround on AIX

Posted by Flaffer <be...@gmail.com>.
Let me float the problem by you. Maybe I am overlooking something in
the config. We have a hard coded URI that goes
"/servlet/com.bo.hsal.HSALServlet?foo" (it is in 3rd party software
that we do not have the source for). With the invoker taken out, any
call to /servlet fails because it cannot find a context (with the
invoker in the config, it finds it in the "default context").

What combination of <servlet> and <servlet-mapping> would you use in
the web.xml?

Maye I have the config wrong.

And yes, this migration is a Royal Pain in the posterior. Don't get me started.

Ben Ricker


On Fri, 28 Jan 2005 09:58:47 -0500, Parsons Technical Services
<pa...@earthlink.net> wrote:
> 
> The different jvm can be a real headache. Even the same jvm on different
> platforms can be a pain. And you have both!
> 
> I think it will work but I work on Win and Linux so I can't swear to it. I
> know it's the normal way to do it.
> 
> Let us know if you need anything more.
> 
> Doug
> 
> 
> Ben wrote:
> >I will try putting the ervlet mapping in the app web.xml.
> >
> > A note: the config I gave WORKS on Solaris (using 1.3.1 Sun) but not
> > on AIX (using IBM 1.3.1  JDK). We have several other issue where
> > something works out-of-the-box on Solaris but does not work on AIX
> > with IBM's JDK. Frustrating, that is.
> >
> > Ben Ricker
> >
> > On Thu, 27 Jan 2005 22:45:02 -0500, Parsons Technical Services
> > <pa...@earthlink.net> wrote:
> >> I have not worked with TC4 but I think your problem is that the mappings
> >> for
> >> the servlets should be in the web.xml for the app and not in the general
> >> web.xml. Also when you do the mappings in the app web.xml you do not need
> >> fully qualified paths.
> >>
> >> Doug
> >
> > --
> > Ben Ricker
> > He's just this guy, you know?
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 
> 


-- 
Ben Ricker
He's just this guy, you know?

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Invoker workaround on AIX

Posted by Parsons Technical Services <pa...@earthlink.net>.
The different jvm can be a real headache. Even the same jvm on different 
platforms can be a pain. And you have both!

I think it will work but I work on Win and Linux so I can't swear to it. I 
know it's the normal way to do it.

Let us know if you need anything more.

Doug


Ben wrote:
>I will try putting the ervlet mapping in the app web.xml.
>
> A note: the config I gave WORKS on Solaris (using 1.3.1 Sun) but not
> on AIX (using IBM 1.3.1  JDK). We have several other issue where
> something works out-of-the-box on Solaris but does not work on AIX
> with IBM's JDK. Frustrating, that is.
>
> Ben Ricker
>
> On Thu, 27 Jan 2005 22:45:02 -0500, Parsons Technical Services
> <pa...@earthlink.net> wrote:
>> I have not worked with TC4 but I think your problem is that the mappings 
>> for
>> the servlets should be in the web.xml for the app and not in the general
>> web.xml. Also when you do the mappings in the app web.xml you do not need
>> fully qualified paths.
>>
>> Doug
>
> -- 
> Ben Ricker
> He's just this guy, you know?
>
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Invoker workaround on AIX

Posted by Parsons Technical Services <pa...@earthlink.net>.
I have not worked with TC4 but I think your problem is that the mappings for 
the servlets should be in the web.xml for the app and not in the general 
web.xml. Also when you do the mappings in the app web.xml you do not need 
fully qualified paths.

Doug

----- Original Message ----- 
From: "Flaffer" <be...@gmail.com>
To: <to...@jakarta.apache.org>
Sent: Thursday, January 27, 2005 12:37 PM
Subject: Invoker workaround on AIX


>I am migrating around 10 apps from Tomcat 4.0.6 (Sun JDK 1.3.1) to
> Tomcat 4.0.6 on AIX 5.2 using IBMs JDK 1.3.1sr7).
>
> I am having an issue working around the invoker servlet. I have the
> workaround(where you explicitely map the /servlet context ) working on
> Solaris. But when I bring the config over to AIX, the URI  "/servlet"
> cannot be mapped to a context.
>
> Here are the two configs. The first one does not work. It throws this
> error in the engine log:
>
> 2005-01-27 10:20:39 StandardHost[pdw0stl5]: Mapping request URI
> '/servlet/com.bo.hsal.servlet'
> 2005-01-27 10:20:39 StandardHost[pdw0stl5]:   Trying the longest
> context path prefix
> 2005-01-27 10:20:39 StandardHost[pdw0stl5]:   Trying the default context
> 2005-01-27 10:20:39 StandardHost[pdw0stl5]: MAPPING configuration
> error for request URI
>
> The access log shows a 500 error thrown on the request. Here is the
> pertinent part of the web.xml for the application server instance
> (i.e., conf/web.xml):
>
> <?xml version="1.0" encoding="ISO-8859-1" ?>
> <!DOCTYPE web-app (View Source for full doctype...)>
> <web-app>
> <servlet>
> <servlet-name>default</servlet-name>
> <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
> <init-param>
> <param-name>debug</param-name>
> <param-value>0</param-value>
> </init-param>
> <init-param>
> <param-name>listings</param-name>
> <param-value>false</param-value>
> </init-param>
> <load-on-startup>1</load-on-startup>
> </servlet>
>
> - <!--  Mapping to replace Invoker servlet. NOTE: USED ONLY BY BO APPS.
> -->
> <!--  LEAVE COMMENTED OUT FOR OTHER APPS. This addresses a securty 
> concern.
> -->
> <!--  See 
> http://marc.theaimsgroup.com/?l=tomcat-user&m=103945394724196&w=2
> -->
>
> <servlet>
> <servlet-name>servlet</servlet-name>
> <servlet-class>com.bo.hsal.HSALServlet</servlet-class>
> </servlet>
>
> <servlet>
> <servlet-name>jsp</servlet-name>
> <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
> <init-param>
> <param-name>logVerbosityLevel</param-name>
> <param-value>WARNING</param-value>
> </init-param>
> <load-on-startup>3</load-on-startup>
> </servlet>
>
> <!--  ================ Built In Servlet Mappings =========================
> -->
> <servlet-mapping>
> <servlet-name>default</servlet-name>
> <url-pattern>/</url-pattern>
> </servlet-mapping>
>
> <!--  Uncomment for BO Apps Only. See Invoker replacement above.
> -->
>
> <servlet-mapping>
> <servlet-name>servlet</servlet-name>
> <url-pattern>/servlet/*</url-pattern>
> </servlet-mapping>
>
> <servlet-mapping>
> <servlet-name>jsp</servlet-name>
> <url-pattern>*.jsp</url-pattern>
> </servlet-mapping>
>
> The config that works is the default one which loads the invoker
> servlet and maps it.
>
> <?xml version="1.0" encoding="ISO-8859-1"?>
>
> <!DOCTYPE web-app
>   PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
>   "http://java.sun.com/dtd/web-app_2_3.dtd">
>
> <web-app>
>
> <servlet>
>   <servlet-name>default</servlet-name>
> 
> <servlet-class>org.apache.catalina.servlets.DefaultServlet</servlet-class>
>   <init-param>
>     <param-name>debug</param-name>
>     <param-value>0</param-value>
>   </init-param>
>   <init-param>
>     <param-name>listings</param-name>
>     <param-value>false</param-value>
>   </init-param>
>   <load-on-startup>1</load-on-startup>
> </servlet>
>
> <servlet>
>   <servlet-name>invoker</servlet-name>
> 
> <servlet-class>org.apache.catalina.servlets.InvokerServlet</servlet-class>
>   <init-param>
>     <param-name>debug</param-name>
>     <param-value>0</param-value>
>   </init-param>
>   <load-on-startup>2</load-on-startup>
> </servlet>
>
> <servlet>
>   <servlet-name>jsp</servlet-name>
>   <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>
>   <init-param>
>     <param-name>logVerbosityLevel</param-name>
>     <param-value>WARNING</param-value>
>   </init-param>
>   <load-on-startup>3</load-on-startup>
> </servlet>
>
> <!-- ================ Built In Servlet Mappings 
> ========================= -->
>
> <servlet-mapping>
>   <servlet-name>default</servlet-name>
>   <url-pattern>/</url-pattern>
> </servlet-mapping>
>
> <!-- The mapping for the invoker servlet -->
>
> <servlet-mapping>
>   <servlet-name>invoker</servlet-name>
>   <url-pattern>/servlet/*</url-pattern>
> </servlet-mapping>
>
> Any ideas?
>
> -- 
> Ben Ricker
> He's just this guy, you know?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
> 



---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org