• Post Reply Bookmark Topic Watch Topic
  • New Topic

Tomcat upgrade now servlets unavailable

 
Torque
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1179
Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try read this link: http://www.moreservlets.com/Using-Tomcat-4.html
PS: read about '3. Enable the Invoker Servlet'
Rene
 
matt hooker
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ....
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!