Simple problem (hopefully) and I've been here before, but for some reason I can't find my way through this error.
Here's the scenario:
I've written a servlet which I'm deploying in Tomcat 5.5 using Apache 2.2 as the web server. The servlet is a controller for one domain I have on my server (lets call it the 'abc' domain.) The servlet is bundled into a war file and deploys into Tomcat with no errors. The servlet-mapping in the web.xml file defines the following:
No, I didn't install the app as the default Tomcat app (at least I didn't mean to). This instance of Tomcat will eventually host 3 web apps for me, and I wanted each to be wholy and completely seperate. The ROOT app in Tomcat still exists, and when I point a browser to http://localhost:8080/ it displays the default Tomcat page (with links to the manager, examples, etc. in the left-hand menu).
I had wanted to manage things by URL so that if the URL pattern '/abc' came in, it would map to the web app I am trying to deploy.
Is this not correct? In the past I seem to remember having been able to do this, and I was able to get things configured properly. Unfortunately this was a few years ago, and I no longer remember how I did it.
[ July 19, 2006: Message edited by: Darren Hall ] [ July 19, 2006: Message edited by: Darren Hall ]
posted 13 years ago
I've resolved the issue.
Essentially the war file was named 'foo.war' and was deploying to the webapps/foo/ directory, yet I was looking for the abc/ url mapping for my servlet.
By renaming my war to abc.war and having it deploy in the webapps/abc/ directory the mapping worked correctly and the servlet could be reached.
I'm not sure if this is the "correct" answer, but it does work, so I'll take it for now. [ July 24, 2006: Message edited by: Darren Hall ]
Hi, I experienced the same problem. I've been executing some examples from the Java book. After two days of exploring, I discovered that the solution was very simple:
Appache server is sensitive to capital letters and therefore it makes the difference between "web.XML" and "web.xml". The file named "web.XML" is not recognized by the Apache as valid web.xml file. It must be "web.xml"!