Forums Register Login

Servlet Not Found 404

+Pie Number of slices to send: Send
Hi All,
I have created a folder nauman and placed two files index.html and NKServlet.class with NKServlet.java in this way
c:\tomcat4.1\webapps\nauman\index.html
c:\tomcat4.1\webapps\nauman\WEB-INF\classes\NKServlet.class
c:\tomcat4.1\webapps\nauman\WEB-INF\classes\NKServlet.java
c:\tomcat4.1\webapps\nauman\WEB-INF\web.xml
and I wrote web.xml
<web-app>
<servlet>
<servlet-name>NKServlet</servlet-name>
<servlet-class>NKServlet</servlet-class>
</servlet>
</web-app>
When i run the http://localhost:8080/nauman/index.html, it works fine but when i click the submit button which takes me to Servlet, It doesn't work,
It says 404 NKServlet not found. I tried to run with different way but it doesn't work
code of index.html is
<form name="Newfrm" action="servlet/NKServlet" method="POST">
<input type=submit value="submit">
</form>
I did this with href to use get method but It doesn't work.
Please help me to find where I'm making mistakes to run the servlet.
Thanks in Advance,
Nauman
+Pie Number of slices to send: Send
Howdy Nauman, welcome to the Ranch!
One rule you are problably not aware of is that it is considered a no-no to post the same question multiple forums.
Please pick the one forum which you think is most appropriate for your question. And don't worry, if you get it wrong, the friendly neighborhood bartender will move your post to the appropriate forum.
thanks,
bear
+Pie Number of slices to send: Send
OK, two rules: your display name doesn't match the naming policy. The Servlet bartend will probably be hitting you up to change it, so why not be a pal and take a look at the JavaRanch Naming Policy and change your display name to match it.
thanks again,
bear
+Pie Number of slices to send: Send
Thanks for update me.But the reason to post this room is because I didn't get the response of my question that's why I posted here.
I will also have a look of JavaRanch Policy.
Thanks
+Pie Number of slices to send: Send
Hi Nauman, regardless of your reason, cross-posting is discouraged. By the way, you waited exactly one hour before cross-posting. Do you really expect instantaneous responses?
bear
P.S. Thanks for adjusting your name as per policy!
[ September 17, 2003: Message edited by: Bear Bibeault ]
roses are red, violets are blue. Some poems rhyme and some are a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 634 times.
Similar Threads
404 error on calling my servlet
Tomcat 404 error
problems with web.xml
Having trouble getting Tomcat up and running
http 404 error
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 14:21:01.