I've looked over all my code and it seems to match the text from the book.
Here's what my files look like.
As far as the directory structure goes, my class files reside in <tomcat home>\webapps\listenerTest\WEB-INF\classes\com\example and my web.xml file resides in <tomcat home>\webapps\listenerTest\WEB-INF.
I've checked the logs and nothing goofy appears to be going on. The other webapps from earlier in the book still work just fine but this one has been giving me fits all day. I have a feeling I'm missing something really simple but it's just eluding me at this point.
Well, I copied your code as it is... and it worked! So I think you need to check if the class files etc. are all in place. One more suggestion, with the same web.xml try accessing some other servlet. Map one more servlet in the same web.xml and see if it works.
All the best!
SCJP 1.5 | SCWCD 5 | SCJP 6.0
[url]http://a2zjava.webs.com[/url] - Online training for Java/JSPs and Servlets/SCJP/SCWCD
Joined: Jul 07, 2009
Thanks for your reply, Soniya.
I finally got it working. I think maybe my problem was with the text editor I used to create the web.xml file. I had originally created it using EditPad Lite. So I deleted the file and created it again using JCreator and that worked. So I guess I won't be using EditPad for xml files any more.