Win a copy of Microservices Testing (Live Project) this week in the Spring 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

Having trouble getting Tomcat up and running

 
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey folks,

I'm trying to install and configure Tomcat on a new machine and, for some reason, I seem to be running into a snag. This is what I have so far:

Tomcat 5.0.28 installed on Windows XP Pro
Under the Tomcat installation directory, I have the following hierarchy:

webapps
webapps/servlets-examples
webapps/servlets-examples/index.html
webapps/servlets-examples/WEB-INF
webapps/servlets-examples/WEB-INF/web.xml
webapss/servlets-examples/WEB-INF/classes/...
webapps/ch1
webapps/ch1/index.html
webapps/ch1/WEB-INF
webapps/ch1/WEB-INF/web.xml
webapps/ch1/WEB-INF/classes/...

Of course, there are other directories, but these are the ones I am most concerned about. My problem is that I can't seem to access anything within the "ch1" directory. If I type in the URL "http://localhost:8080/servlets-examples/" I can see the file webapps/servlets-examples/index.html. However, if I type in the URL "http://localhost:8080/ch1/", I get a 404 error. I was expecting to see the file webapps/ch1/index.html.

I'm having the same problem trying to access the servlet I created and placed into webapps\ch1\WEB-INF\classes.

Is there something I should be looking at to figure out why I can't access this file? In case anyone is curious, I've been following the steps laid out in "Head First Servlets & JSP" in order to get up and running.

In case it's relevant, here's the deployment descriptor I put into webapps/ch1/WEB-INF:



Thanks, folks.
 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sorry folks, my bad. I had a hunch the problem was in the web.xml file but I was paying too much attention to the spelling of the tags and not enough attention to the spelling of my servlet name. I'm such a goon. It's up and running now.
 
What's that smell? I think this tiny ad may have stepped in something.
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic