• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Cannot access the HelloWorldServlet

 
Ranch Hand
Posts: 58
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1056
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
reply
    Bookmark Topic Watch Topic
  • New Topic