• Post Reply Bookmark Topic Watch Topic
  • New Topic

HTTP 404 The requested resource is not available.  RSS feed

 
sanket jani
Ranch Hand
Posts: 47
C++ Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi friends ,

i have one html page through which i want to go to servlet page but after submit it give the http 404 error.

i am using tomcat apache server.

here i have attached two file ..

please help me to solve this friends..
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the URL for which the 404 is reported? How is the servlet mapped?
 
sanket jani
Ranch Hand
Posts: 47
C++ Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
URL:-
localhost:8080/MVCuse/NewFile.html

this is my xml file
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/javaee"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
id="WebApp_ID" version="3.0" metadata-complete="true">

<welcome-file-list>
<welcome-file>index.html</welcome-file>
<welcome-file>index.htm</welcome-file>
<welcome-file>index.jsp</welcome-file>
<welcome-file>default.html</welcome-file>
<welcome-file>default.htm</welcome-file>
<welcome-file>default.jsp</welcome-file>
</welcome-file-list>
<servlet>
<servlet-name>abc.java</servlet-name>
<servlet-class>san.km.abc</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>abc.java</servlet-name>
<url-pattern>/abc.do</url-pattern>
</servlet-mapping>
</web-app>
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ulf Dittmer wrote:What is the URL for which the 404 is reported?


localhost:8080/MVCuse/NewFile.html is the page where the servlet is linked from, but it's not the URL that causes the 404 (at least if I understand your post correctly).

The URL for the servlet should probably be localhost:8080/MVCuse/abc.do; I'm guessing the 404 happens for some other URL.
 
sanket jani
Ranch Hand
Posts: 47
C++ Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes you are right ..

after submitting the url for error page is :-

http://localhost:8080/MVCuse/abc.java?txt1=sanket
 
Ulf Dittmer
Rancher
Posts: 42972
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
abc.java is the name of the pattern, its value is abc.do. So that's what you need to use as the URL.
 
sanket jani
Ranch Hand
Posts: 47
C++ Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks bro ..

my problem is solved..

thank you very much for your kind help...
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!