• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

compiled the servlet - I have - how do I run it - please help!!!!!

 
david allen
Ranch Hand
Posts: 185
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have almost reached breaking point. I feel like my head is about to explode.
I have managed to install tomcat and the jdk.
I have written a servlet and much to my astonishment it compiles!!
Now I have put the class file in
ROOT\WEB-INF
but when I user the URL http://localhost/servlet/hello
I get an error message. Do I have to edit the web.xml file. If so you could someone please post the code.
Please let me know
thanks
david
 
Engin Okucu
Ranch Hand
Posts: 174
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
put your MyServlet.class into 'classes' folder.
And 'classes' must be into WEB_INF like this :
ROOT/WEB-INF/classes/MyServlet.class
and try by writing http://localhost:8080/ROOT/servlet/MyServlet
it must work.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic