This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Servlets and the fly likes servlets directory Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "servlets directory" Watch "servlets directory" New topic
Author

servlets directory

krupa devi
Greenhorn

Joined: Jul 02, 2001
Posts: 14
Hi,
I have written my first servlet and I want to see it on the browser.
I created a html called ShowForm.html in the directory
d:/jakarta_tomcat/Webapps/servlets/ShowForm.html

and my Sampleservlet.class and Sampleservlet.Java are under
d:/jakarta_tomcat/Webapps/WEB_INF/Classes/ServletProject

on the browser if I say http://localhost:8080/examples/servlet/ServletProject.Sampleservlet
it is working
but, from the HTML when I say
<form
Action =ServletProject.Sampleservlet
Method = Post>
</form>
this is the address it pulled up when I hit submit button
http://localhost:8080/examples/servlets/ServletProject.Sampleservlet
please note the difference between servlets and servlet. How can I change this?
Please help.
Krupa
Beksy Kurian
Ranch Hand

Joined: Jul 11, 2001
Posts: 254
Try changing the
action="/examples/servlet/yourservlet"
krupa devi
Greenhorn

Joined: Jul 02, 2001
Posts: 14
Thanks Beksy,
It worked.
thanks,
Krupa
 
wood burning stoves
 
subject: servlets directory