This week's book giveaway is in the Agile and Other Processes forum.
We're giving away four copies of The Journey To Enterprise Agility and have Daryl Kulak & Hong Li on-line!
See this thread for details.
Win a copy of The Journey To Enterprise Agility this week in the Agile and Other Processes forum! And see the welcome thread for 20% off.
  • 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:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

Apache Tomcat and Servlet  RSS feed

 
Ranch Hand
Posts: 155
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
I've downloaded Apache Tomcat and I am trying to test some servlets. My .jsp and .html files are working fine but when I am trying to load servlet through Browser it's giving.....
The requested resource (/servlet/HelloServlet) is not available
I've saved my HelloServlet.java file in ...
C:\jakarta-tomcat-4.0.1\webapps\ROOT\WEB-INF
It is also not giving any compilation problem. My HelloServlet.class file is also in \WEB-INF dir.
can anybody give me idea why this is happening.
thanks,
Shivani
 
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You might want to try mapping the servlet in a *-apps.xml file. I'm sorry if this is a little off as I can't look at my Tomcat config at the moment.
However, if you look in the conf directory, you should see a file that's named examples-apps.xml or something similar. Create one like that for your application (call it myApp-apps.xml, for example). That file will automatically be read when the server starts.
Let me know if that helps,
Corey
P.S.
You'd probably get a lot better help in the Apache/Tomcat forum.
 
Ranch Hand
Posts: 3244
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
shivani
Your compiled servlets should be in the WEB-INF/classes directory in tomcat. That's the server can't find them.
Dave
 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Originally posted by Dave Vick:
Your compiled servlets should be in the WEB-INF/classes directory in tomcat.


Oh yeah - I forgot about the classes directory. Sorry. Dave's right.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!