HFSJ ServetContext Listener demo, error 404, /listenerTest/ListenTest.do not found
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
I am trying to run the ServletContextListener demo from HFSJ, pg 170-177. However, I get an error message when I try to access the url http://localhost:8080/listenerTest/ListenTest.do:
HTTP Status 404 - /listenerTest/ListenTest.do
type Status report
message /listenerTest/ListenTest.do
description The requested resource (/listenerTest/ListenTest.do) is not available.
Apache Tomcat/5.5.25
Tried though I have, I can't find any mistake(s) in my web.xml file. Here it is :
And here is the tomcat directory structure for the app:
C:\Program Files\Apache Software Foundation\Tomcat5.5\webapps\listenerTest>dir /s
Volume in drive C has no label.
Volume Serial Number is 14F1-A032
Directory of C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\listenerTest
11/22/2007 06:29 PM <DIR> .
11/22/2007 06:29 PM <DIR> ..
11/23/2007 06:04 PM <DIR> WEB-INF
1 File(s) 270 bytes
Directory of C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\listenerTest\WEB-INF
11/23/2007 06:04 PM <DIR> .
11/23/2007 06:04 PM <DIR> ..
11/22/2007 06:28 PM <DIR> classes
11/22/2007 06:28 PM <DIR> lib
11/23/2007 06:43 PM 687 web.xml
1 File(s) 687 bytes
Directory of C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\listenerTest\WEB-INF\classes
11/22/2007 06:28 PM <DIR> .
11/22/2007 06:28 PM <DIR> ..
11/22/2007 06:28 PM <DIR> com
0 File(s) 0 bytes
Directory of C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\listenerTest\WEB-INF\classes\com
11/22/2007 06:28 PM <DIR> .
11/22/2007 06:28 PM <DIR> ..
11/23/2007 03:21 PM <DIR> example
0 File(s) 0 bytes
Directory of C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\listenerTest\WEB-INF\classes\com\example
11/23/2007 03:21 PM <DIR> .
11/23/2007 03:21 PM <DIR> ..
11/23/2007 04:52 PM 353 Dog.class
11/23/2007 04:53 PM 1,213 ListenerTester.class
11/23/2007 04:53 PM 837 MyServletContextListener.class
3 File(s) 2,403 bytes
Directory of C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\listenerTest\WEB-INF\lib
11/22/2007 06:28 PM <DIR> .
11/22/2007 06:28 PM <DIR> ..
0 File(s) 0 bytes
Total Files Listed:
5 File(s) 3,360 bytes
17 Dir(s) 2,160,082,944 bytes free
Here are the sources of the java files:
Dog.java
ListenerTester.java
MyServletContextListener.java
Any idea what's wrong?
Thanks in advance for your time!
Aditya
It's never too late to be what you might have been.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
Also, take a look at the "List Applications" in the Tomcat manager application to see if your app has been deployed.
http://localhost:8080/manager/html
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
I opened the manager page and the application was listed in the list of deployed applications and there are no errors located in the Tomcat logs.
It's never too late to be what you might have been.
-
-
Number of slices to send:Optional 'thank-you' note:
-
-
I am just curious whether the order of the tag in the web.xml matter, like if the context-param should be placed before the servlet configuration
| Anderson gave himself the promotion. So I gave myself this tiny ad: The new gardening playing cards kickstarter is now live! https://www.kickstarter.com/projects/paulwheaton/garden-cards |








