Win a copy of Kubernetes in Action this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

servlet created by wizard cannot be deployed using Eclipse, but works when put into autodeploy file.  RSS feed

 
Greenhorn
Posts: 12
Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator




However, if I choose to extends HttpServlet rather than implements Servlet and follow the wizard it works well.



Anyone know the reason? Thanks for your reading!


 
Ranch Foreman
Posts: 3141
37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your first URL in that screenshot is trying to find a resource called First.java.

The mapping in your First class is '/First', not '/First.java'.
 
Author and ninkuma
Marshal
Posts: 66352
155
IntelliJ IDE Java jQuery Mac Mac OS X
  • Likes 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Boyi Shen wrote:if I choose to extends HttpServlet rather than implements Servlet



Well, of course.
 
Boyi Shen
Greenhorn
Posts: 12
Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Bear Bibeault wrote:

Boyi Shen wrote:if I choose to extends HttpServlet rather than implements Servlet



Well, of course.



Good enough, save brains.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!