Win a copy of Kotlin in Action this week in the Kotlin 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

 
Boyi Shen
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!


 
Dave Tolls
Rancher
Posts: 2914
36
  • 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'.
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66205
151
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!