Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

jspServlet doesnt work

 
bostian tov
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
is it /b or /bill?
 
Abimaran Kugathasan
Ranch Hand
Posts: 2066
Clojure IntelliJ IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your url pattern in the web.xml is different from your invoke url. Please check!
 
bostian tov
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 277
Eclipse IDE Java PHP
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic