This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
I just started reading 'SCWD Exam Study Kit.' I'm trying to get the hello world servlet to work in the first chapter, but Tomcat 5 gives me the message "The requested resource (/chapter01/servlet/HelloWorldServlet) is not available." What am I missing?
If there was a problem parsing your web.xml deployment descriptor (or any of several other problems) Tomcat won't load your web-app, so the servlet won't "exist". Error messages go into the logs in the TomcatDirectory/logs directory... check for any error stack traces related to your application.
Write once, run anywhere, because there's nowhere to hide! - /. A.C.
This happens when we use the Tomcat 5 or later. The reason is the default sevlet handling invoke servlet is disabled for this versions. so the url os the type ..../servlet/somservlet will not execute by default. We have to define the <servlet-mapping> in the web.xml for the servlet. Without <servlet-mapping> it will not map the servlet to URL.
Yo can uncomment the default Invoker servlet which define the mapping <servlet-mapping>/servlet/*</servlet-mapping>. I had tried this, but I forgot where I had uncommented this. ( I think in default web.xml)