Hello Guys,
I've been following the discussions about the HelloWorld
servlet not working in
Tomcat v4.1.27. Since I suffer from the same problem I tried a few of the suggested solutions last night but to no avail.
I am running Redhat 9,
Java SDK 1.4, J2EE1.2 & Tomcat 4.1.27 LE.
There were two main solutions to this problem:
1. Uncomment the following line in the web.xml file ( in conf dir ).
<servlet-mapping>
<servlet-name>invoker</servlet-name>
<url-pattern>/servlet/*<url-pattern>
<servlet-mapping>
Stop / Start Tomcat.
This should have allowed me to view the URL
http://localhost8080/myApp/HelloWorld However I still got the 404 page not found error.
2. Next I looked at the examples which come with Tomcat & work.
They have the <servlet-mapping> & <url-pattern> tags in the applications web.xml file. So I edited my HelloWorld's web.xml & inserted these lines.
Stopped/started Tomcat but it still didn't work.
The only othre difference between the examples web.xml & my is a load of stuff about filters?
Can anybody help as I'm beginning to feel a lot of resentment towards Tomcat!!!
Cheers - Michael.