You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Guillermo Mora Pérez <GM...@iingen.unam.mx> on 2003/03/26 04:24:58 UTC

status 404 when migrating from 4.0.4 to 4.1.24

Hi, I had a JSP/servlet application running ok on a tomcat 4.0.4, I installed a 4.1.24 version, I updated my CATALINA_HOME an move my old 

CATALINA_HOME\classes\packageX\servletX.class

to the dir 

CATALINA_HOME\webapps\ROOT\WEB-INF\classes\packageX\servletX.class

of the new version, and obviously mi old ROOT dir to my new ROOT. 

When I run my JSP's, the system can find the classes into the package of the the new classes directory, but when I try to use the servlets with 

/servlet/packageX.servletX

it sends the status 404

Even if I try to run a simple servlet on the classes dir (/servlet/servletY)

What happen? I´ve tried to do the same on a ver 4.1.18 but is the same

Thanks

Guillermo.

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


Re: status 404 when migrating from 4.0.4 to 4.1.24

Posted by Maximiliano Palacios <ma...@exporganica.com.ar>.
You have to put the entire location of the class, (add the package of the
class too).

Best regards,
Maximiliano Palacios

> If you put this :
> <servlet-mapping>
>     <servlet-name>invoker</servlet-name>
>     <url-pattern>/servlet/*</url-pattern>
>   </servlet-mapping>
>
> in your web.xml then you can use this to load your own servlets without
> defining them.
> If remember correctly ; then the class that would be loaded in this
> example :
> http://localhost/myapp/servlet/stuff
>
> would be stuff.class.
>
>
>
> --------------------------------------------------------------------- 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


Re: status 404 when migrating from 4.0.4 to 4.1.24

Posted by Kwok Peng Tuck <pe...@makmal.net>.
If you put this :
<servlet-mapping>
    <servlet-name>invoker</servlet-name>
    <url-pattern>/servlet/*</url-pattern>
  </servlet-mapping>

in your web.xml then you can use this to load your own servlets without 
defining them.
If remember correctly ; then the class that would be loaded in this 
example :
http://localhost/myapp/servlet/stuff

would be stuff.class.



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


Re: status 404 when migrating from 4.0.4 to 4.1.24

Posted by Sven Köhler <sk...@upb.de>.
> http://localhost/myapp/servlet/stuff

so which class would the invoker servlet load to serve the above URL?
doesn't this need a config again like i use to have it in the web.xml file?



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


Re: status 404 when migrating from 4.0.4 to 4.1.24

Posted by Kwok Peng Tuck <pe...@makmal.net>.
The servlet invoker lets you call your servlet in the webapp without 
actually mapping one in the web.xml

So you can do this in the browser:

http://localhost/myapp/servlet/stuff

You're not really missing much.
Don't know if the other containers do that.

Sven Köhler wrote:

>>   <servlet-mapping>
>>     <servlet-name>invoker</servlet-name>
>>     <url-pattern>/servlet/*</url-pattern>
>>   </servlet-mapping>
>
>
> one stupid question, what does the invoker-servlet do?
> i always write my own servlets without using it, and my mapping them 
> directly using web.xml.
> i wonder, if i'm missing a great feature. is the invoker servlet 
> supported by all servlet containers?
>
>
>
> ---------------------------------------------------------------------
> 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


RE: status 404 when migrating from 4.0.4 to 4.1.24

Posted by George Sexton <gs...@mhsoftware.com>.
My experience is that few other servlet engines enable an invoker by
default. Many just don't have one. I re-wrote my application to use a
web.xml mapping file for all servlets so that I would have better
cross-engine compatibility.

-----Original Message-----
From: news [mailto:news@main.gmane.org]On Behalf Of Sven Kohler
Sent: Wednesday, March 26, 2003 12:12 AM
To: tomcat-user@jakarta.apache.org
Subject: Re: status 404 when migrating from 4.0.4 to 4.1.24


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

one stupid question, what does the invoker-servlet do?
i always write my own servlets without using it, and my mapping them
directly using web.xml.
i wonder, if i'm missing a great feature. is the invoker servlet
supported by all servlet containers?



---------------------------------------------------------------------
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


Re: status 404 when migrating from 4.0.4 to 4.1.24

Posted by Sven Köhler <sk...@upb.de>.
>   <servlet-mapping>
>     <servlet-name>invoker</servlet-name>
>     <url-pattern>/servlet/*</url-pattern>
>   </servlet-mapping>

one stupid question, what does the invoker-servlet do?
i always write my own servlets without using it, and my mapping them 
directly using web.xml.
i wonder, if i'm missing a great feature. is the invoker servlet 
supported by all servlet containers?



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


Re: status 404 when migrating from 4.0.4 to 4.1.24

Posted by Romualdo Rubens de Freitas <ro...@sercomtel.com.br>.
Guillermo,

Starting with version 4.1, TC dosen't enable default servlets anymore.

So, you can:
1 Enable default servlet by changing %CATALINA_HOME%/conf/web.xml
   (not recommended)
2 Enable default servlet by putting the following into your web.xml
   <servlet-mapping>
     <servlet-name>invoker</servlet-name>
     <url-pattern>/servlet/*</url-pattern>
   </servlet-mapping>
3 Create a context into %CATALINA_HOME%/conf/server.xml for your app
4 Create a <context>.xml file for your app and put it into
   %CATALINA_HOME%/webapps

Regards,
Romualdo Rubens de Freitas
mailto:romualdo@sercomtel.com.br



Guillermo Mora Pérez escreveu:
> Hi, I had a JSP/servlet application running ok on a tomcat 4.0.4, I installed a 4.1.24 version, I updated my CATALINA_HOME an move my old 
> 
> CATALINA_HOME\classes\packageX\servletX.class
> 
> to the dir 
> 
> CATALINA_HOME\webapps\ROOT\WEB-INF\classes\packageX\servletX.class
> 
> of the new version, and obviously mi old ROOT dir to my new ROOT. 
> 
> When I run my JSP's, the system can find the classes into the package of the the new classes directory, but when I try to use the servlets with 
> 
> /servlet/packageX.servletX
> 
> it sends the status 404
> 
> Even if I try to run a simple servlet on the classes dir (/servlet/servletY)
> 
> What happen? I´ve tried to do the same on a ver 4.1.18 but is the same
> 
> Thanks
> 
> Guillermo.
> 
> ---------------------------------------------------------------------
> 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


Re: status 404 when migrating from 4.0.4 to 4.1.24

Posted by Tim Funk <fu...@joedog.org>.
If this thread is still alive ...
http://tomcatfaq.sourceforge.net/miscellaneous.html

And check the links to previous conversations about this.

-Tim

John Turner wrote:
> 
> The Invoker servlet in 4.1.x is disabled by default for security 
> reasons.  You will need to enable it (not recommended) or explicitly map 
> your servlets in your application's web.xml file.  See the release notes.
> 
> John
> 
> On Tue, 25 Mar 2003 21:24:58 -0600, Guillermo Mora Pérez 
> <GM...@iingen.unam.mx> wrote:
> 
>> Hi, I had a JSP/servlet application running ok on a tomcat 4.0.4, I 
>> installed a 4.1.24 version, I updated my CATALINA_HOME an move my old
>>
>> CATALINA_HOME\classes\packageX\servletX.class
>>
>> to the dir
>>
>> CATALINA_HOME\webapps\ROOT\WEB-INF\classes\packageX\servletX.class
>>
>> of the new version, and obviously mi old ROOT dir to my new ROOT.
>>
>> When I run my JSP's, the system can find the classes into the package 
>> of the the new classes directory, but when I try to use the servlets with
>>
>> /servlet/packageX.servletX
>>
>> it sends the status 404
>>
>> Even if I try to run a simple servlet on the classes dir 
>> (/servlet/servletY)
>>
>> What happen? I´ve tried to do the same on a ver 4.1.18 but is the same
>>
>> Thanks
>>
>> Guillermo.
>>
>> ---------------------------------------------------------------------
>> 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


Re: status 404 when migrating from 4.0.4 to 4.1.24

Posted by John Turner <to...@johnturner.com>.
The Invoker servlet in 4.1.x is disabled by default for security reasons.  
You will need to enable it (not recommended) or explicitly map your 
servlets in your application's web.xml file.  See the release notes.

John

On Tue, 25 Mar 2003 21:24:58 -0600, Guillermo Mora Pérez 
<GM...@iingen.unam.mx> wrote:

> Hi, I had a JSP/servlet application running ok on a tomcat 4.0.4, I 
> installed a 4.1.24 version, I updated my CATALINA_HOME an move my old
>
> CATALINA_HOME\classes\packageX\servletX.class
>
> to the dir
>
> CATALINA_HOME\webapps\ROOT\WEB-INF\classes\packageX\servletX.class
>
> of the new version, and obviously mi old ROOT dir to my new ROOT.
>
> When I run my JSP's, the system can find the classes into the package of 
> the the new classes directory, but when I try to use the servlets with
>
> /servlet/packageX.servletX
>
> it sends the status 404
>
> Even if I try to run a simple servlet on the classes dir 
> (/servlet/servletY)
>
> What happen? I´ve tried to do the same on a ver 4.1.18 but is the same
>
> Thanks
>
> Guillermo.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>



-- 
Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

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