Win a copy of OCP Oracle Certified Professional Java SE 11 Developer Practice Tests this week in the OCP forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
Sheriffs:
  • Devaka Cooray
  • paul wheaton
  • Mark Herschberg
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
  • Jj Roberts
Bartenders:
  • Carey Brown
  • salvin francis
  • Piet Souris

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 ]
 
A magnificient life is loaded with tough challenges. En garde tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic