IntelliJ Java IDE
The moose likes JSP and the fly likes Tomcat upgrade now servlets unavailable Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » JSP
Reply Bookmark "Tomcat upgrade now servlets unavailable" Watch "Tomcat upgrade now servlets unavailable" New topic
Author

Tomcat upgrade now servlets unavailable

Torque
Greenhorn

Joined: Feb 04, 2003
Posts: 4
Hi, I'm in the process of moving an application from Tomcat v3.2 to v4.1. My app is JSP/servlets on MySQL, on Windows (the Linux port comes next :roll: ).
For a start, I just copied all my JSP, class and jar files 'as is' from tomcat3/myapp to tomcat4/myapp. I'm impressed with how much of it just works The problem is with my servlets. They are located as follows:
tomcat4/myapp/WEB-INF/classes/myservlet.class
I have added the following to web.xml (didn't seem to be needed in 3.2)
<servlet>
<servlet-name>myservlet</servlet-name>
<servlet-class>myservlet</servlet-class>
</servlet>
but even if I put
myserver/myapp/servlet/myservlet
in my browser command line, v4 can't find it, whereas v3.2 does. I've tried various other ways of referencing it, but nothing seems to work.
I feel as if I must be missing something basic, but I just can't spot it, and my searching hasn't found anything. Any ideas?
Rene Larsen
Ranch Hand

Joined: Oct 12, 2001
Posts: 1177

Try read this link: http://www.moreservlets.com/Using-Tomcat-4.html
PS: read about '3. Enable the Invoker Servlet'
Rene


Regards, Rene Larsen
Dropbox Invite
matt hooker
Ranch Hand

Joined: Jul 26, 2001
Posts: 46
Hi,
try adding the following lines to your web.xml :
<servlet-mapping>
<servlet-name>myservlet</servlet-name>
<url-pattern>/mylilservlet</url-pattern>
</servlet-mapping>
and then invoking with :
myserver/myapp/mylilservlet
That should fix ya ....


Its not what you do, its the way you say you've done it.
 
jQuery in Action, 2nd edition
 
subject: Tomcat upgrade now servlets unavailable
 
Threads others viewed
Servlet to open a pdf
HTTP Status 404 servlet error ("The requested resource is not available")
cannot invoke servlet in Tomcat
Tomcat 404 error
trouble loading servlet class on Tomcat4.1.24
MyEclipse, The Clear Choice