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
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