This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Servlets and the fly likes jspServlet doesnt work Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "jspServlet doesnt work" Watch "jspServlet doesnt work" New topic

jspServlet doesnt work

bostian tov
Ranch Hand

Joined: Mar 11, 2010
Posts: 32
I have create servlet and extend it with jspServlet class. I also set servlet in my web.xml. When i try to start it i get an error:

David O'Meara

Joined: Mar 06, 2001
Posts: 13459

is it /b or /bill?
Abimaran Kugathasan
Ranch Hand

Joined: Nov 04, 2009
Posts: 2066

Your url pattern in the web.xml is different from your invoke url. Please check!

|BSc in Electronic Eng| |SCJP 6.0 91%| |SCWCD 5 92%|
bostian tov
Ranch Hand

Joined: Mar 11, 2010
Posts: 32
Sorry, i get:

And i am running with jetty... could that have some problems? I tried to change extend to httpServlet, and then it works, but i need to use jspServlet, so have to fix that problem
Michael Angstadt
Ranch Hand

Joined: Jun 17, 2009
Posts: 277

I don't think that extending JspServlet is a common practice. The JspServlet class is used for the servlets that are generated from JSPs. The reason you are getting that error might be because it is looking for a class that extends HttpServlet and it can't find one. Is there any reason why you want to use JspServlet instead of HttpServlet? Also, check to make sure your ReportDownloadServlet class is the "download" package, as this is how it is defined in the deployment descriptor.

I agree. Here's the link:
subject: jspServlet doesnt work
jQuery in Action, 3rd edition