Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

First servlet error message  RSS feed

 
Shiva Mohan
Ranch Hand
Posts: 486
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi - I am new to dynamic web developement and started my first servlet exactly like taught in video link below.

https://www.youtube.com/watch?v=EOkN5IPoJVs

when I started localhost with path /myapp/hello

I am getting error
HTTP Status 500 - Wrapper cannot find servlet class org.javatrainer.HelloServlet or a class it depends on

Please help resolve this error.









 
Jitao Liu
Greenhorn
Posts: 2
Android Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please check in your web.xml to verify again how do you map you servlet of 'HelloServlet' to context path '/hello', because of it is too much simple, should be very quick to fix.
 
Shiva Mohan
Ranch Hand
Posts: 486
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for the reply. I checked web.xml and it is like below


It seems like web.xml is correct and still I get the error msg
 
Bear Bibeault
Author and ninkuma
Marshal
Posts: 66141
141
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the class file for the servlet in the right place? It needs to be under the proper package hierarchy in WEB=INF/classes.

  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!