Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

Servlet Not Found in Tomcat 4.1.24

Nauman Khan

2003-09-17

Replies:

Hi,
I have a problem to run Servlet on Tomcat 4.1.24,I
have mentioned the whole problem,please let me know
how could I resolve this issue.


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



______________________________________________________________________
Post your free ad now! http://personals.yahoo.ca

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)


©2008 junlu.com - Jax Systems, LLC, U.S.A.