• 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

resource not available.

 
Ranch Hand
Posts: 389
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I have created a chapter01 directory under
C:\jakarta-tomcat-4.1.18\webapps
Next, I created a WEB-INF directory under C:\jakarta-tomcat-4.1.18\webapps\chapter01
I developed a HelloWorldServlet, the code is as follows:

I compiled the servlet and copied it under C:\jakarta-tomcat-4.1.18\webapps\chapter01\WEB-INF\classes
The C:\jakarta-tomcat-4.1.18\webapps\chapter01\WEB-INF also has web.xml

I started the tomcat as follows:
C:\jakarta-tomcat-4.1.18\bin>startup
I opened the browser and typed the following url http://localhost:8080/chapter01/servlet/HelloWorldServlet
I got the following response:
description The requested resource (/chapter01/servlet/HelloWorldServlet) is not available.
What must be the reason?
Thanks
Ravi
 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please download the updated version of the source code of the Exam Study Kit. It will work on the lastest version of tomcat.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

browser and typed the following url http://localhost:8080/chapter01/servlet/HelloWorldServlet


The notation that uses /servlet/yourservlet uses the "invoker" servlet to locate and run your class. This used to be available by default but in Tomcat 4.1.18 it is turned off by default. See the web.xml file in TOMCAT_HOME/conf/
Bill
 
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by janapareddy ravindra:
I got the following response:
description The requested resource (/chapter01/servlet/HelloWorldServlet) is not available.


I had the same problem with tomcat-4.1.24.
uncommenting in %CATALINA_HOME%\conf\web.xml solved the problem.
 
reply
    Bookmark Topic Watch Topic
  • New Topic