Women in Technology

Hear us Roar



Subject:   HTTP Status 404 error in The requested resource (/Example) is not available.
Date:   2007-05-06 22:04:24
From:   ghada80
Response to: HTTP Status 404 error in The requested resource (/Example) is not available.

my servlet file path is

C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\examples\WEB-INF\classes\HelloWorldExample.java

and it is a famous servlet exists in Tomcat 6.0 installasion I did not build it or change it

I try the URL

http://localhost:8080/examples/HelloWorldExample

And

http://localhost:8080/HelloWorldExample

And

http://localhost:8080/webapps/examples/WEB-INF/classes/HelloWorldExample

And

http://localhost:8080/examples/WEB-INF/classes/HelloWorldExample
And
http://localhost:8080/WEB-INF/classes/HelloWorldExample

And
http://localhost:8080/classes/HelloWorldExample


And The following message appears in the browser
HTTP Status 404 - /examples/HelloWorldExample


--------------------------------------------------------------------------------


type Status report
message /examples/HelloWorldExample
description The requested resource (/examples/HelloWorldExample) is not available.


--------------------------------------------------------------------------------


Apache Tomcat/6.0.10


I try again by changing web.xml
by writting the URL in <servlet-name> tag, for Example
- <servlet-mapping>
<servlet-name>HelloWorldExample</servlet-name>
<url-pattern>HelloWorldExample</url-pattern>
</servlet-mapping>

to

<servlet-mapping>
<servlet-name>HelloWorldExample</servlet-name>
<url-pattern>http://localhost:8080/HelloWorldExample</url-pattern>
</servlet-mapping>

the same message appears,

please help me I am in urgent need to the reply

and if I try my own servlets what is the changes in web.xml

Main Topics Oldest First

Showing messages 1 through 1 of 1.

  • HTTP Status 404 error in The requested resource (/Example) is not available.
    2009-08-10 00:10:30  ramesh47 [View]

    use this,
    <servlet-mapping>
    <servlet-name>HelloWorldExample</servlet-name>
    <url-pattern>/HelloWorldExample</url-pattern>
    </servlet-mapping>

    this will work....