File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes Head First Servlets program error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Head First Servlets program error" Watch "Head First Servlets program error" New topic

Head First Servlets program error

Angus Nalder

Joined: Feb 27, 2005
Posts: 2
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-name>Ch3 Beer</servlet>
<servlet-name>Ch3 Beer</servlet-name>

The form.html page has "" 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
Angus Nalder

Joined: Feb 27, 2005
Posts: 2
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.

Thanks for reading though
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 32822

Thanks for posting the solution. And welcome to JavaRanch!

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
surbhi tugnawat

Joined: Mar 11, 2005
Posts: 5
I am new to servlets and I am trying to run one of the examples from HSFJ(page 81). I am getting "Wrapper cannot find servlet class " ....cant figure out why...

please help!
I agree. Here's the link:
subject: Head First Servlets program error
jQuery in Action, 3rd edition