This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlet Not Found 404

 
Nauman Khan
Ranch Hand
Posts: 49
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Nauman Khan
Ranch Hand
Posts: 49
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64196
83
IntelliJ IDE Java jQuery Mac Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic