• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Cannot access the HelloWorldServlet

 
Elinor Chang
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Okay, this might sound silly, but I just cannot invoke HelloWorldServlet from my newly installed Tomcat (I've never used Tomcat before). Here is what I did:
1. Copy the my.package.HelloWorldServlet to myTool/WEB-INF/classes/my/package
2. Add the following entry to myTool/WEB-INF/web.xml
<servlet>
<servlet-name>HelloWorldServlet</servlet-name>
<servlet-class>my.package.HelloWorldServlet</servlet-class>
</servlet>
3. run bin/startup.sh
4. try to invoke the HellowWorldServlet as the followings:
http://10.131.69.26:8080/myTool/servlet/HelloWorldServlet
5. Got this error message
404 description The requested resource (/myTool/servlet/HelloWorldServlet) is not available.
Did I miss anything?
Thanks
 
Ron Newman
Ranch Hand
Posts: 1056
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What version of Tomcat are you using?
In later versions, the "invoker" servlet is disabled by default. Re-enable it by un-commenting the following lines in your conf/web.xml file:
 
Elinor Chang
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The invoker is already uncommented. I am using 4.1.27...
 
Ron Newman
Ranch Hand
Posts: 1056
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To make sure the invoker is properly working, can you try this?
http://10.131.69.26:8080/myTool/servlet/my.package.HelloWorldServlet
Also, make sure that all of the elements in your web.xml are in the right order. (I don't know what else you have in there.)
[ August 09, 2003: Message edited by: Ron Newman ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic