When trying to test the servlet from page 81 of Head First Servlets, I get the following error from Tomcat: javax.servlet.ServletException: wrapper cannot find servlet class com.example.web.BeerSelect or a class it depends on.
The web.xml file has .. <servlet> <servlet-name>Ch3 Beer</servlet> <servlet-class>com.example.web.BeerSelect</servlet-class> </servlet> <servlet-mapping> <servlet-name>Ch3 Beer</servlet-name> <url-pattern>/SelectBeer.do</url-pattern> </servlet>
The form.html page has "SelectBeer.do" as the action. I managed to compile ok after reading a previous thread, and the .class file is in classes/com/example/web/BeerSelect.class but am stuck as to what to try next to get it to work. Thanks for any suggestions
posted 14 years ago
As soon as i posted the message, i went back to look at it and saw my problem. I had copy and pasted from my development environment into tomcat/webapps and didn't have the classes folder inside WEB-INF.