Meaningless Drivel is fun!*
The moose likes Servlets and the fly likes compiled the servlet - I have - how do I run it - please help!!!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Java » Servlets
Bookmark "compiled the servlet - I have - how do I run it - please help!!!!!" Watch "compiled the servlet - I have - how do I run it - please help!!!!!" New topic
Author

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

david allen
Ranch Hand

Joined: Sep 27, 2002
Posts: 185
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

Joined: Feb 09, 2002
Posts: 174
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.
 
GeeCON Prague 2014
 
subject: compiled the servlet - I have - how do I run it - please help!!!!!