aspose file tools*
The moose likes Servlets and the fly likes http status 404 The requested resource is not available. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "http status 404 The requested resource is not available." Watch "http status 404 The requested resource is not available." New topic
Author

http status 404 The requested resource is not available.

Ramya reenu
Greenhorn

Joined: Nov 28, 2005
Posts: 13
hi,

this is my first servlet.when i tried a simple servlet in webapps/ROOT i am able run it sucessfully.

But when i try same thing in a separete folder i gives me this error wt is the problem.

Servlet:webapps\HI\WEB-INF\classes
Web.xml:HI\WEB-INF

my XML


<servlet>
<servlet-name>log</servlet-name>
<servlet-class>login</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>log</servlet-name>
<url-pattern>/HI</url-pattern>
</servlet-mapping>


thanx in advance
[ June 16, 2006: Message edited by: Ramya reenu ]
Balasubramani Dharmalingam
Ranch Hand

Joined: Dec 06, 2004
Posts: 116
Can u give the following details,
* Name of the servlet class and package
* Url that you tried after deploying the application


Balasubramani SD,<br />SCJP 1.4,SCWCD 1.4,SCJP 5.0<br /><a href="http://sd.balasubramani.googlepages.com" target="_blank" rel="nofollow">www.sd.balasubramani.googlepages.com</a>
Ramya reenu
Greenhorn

Joined: Nov 28, 2005
Posts: 13
Name of the servlet class:login.java
Package:HI
Tomcat4.1

Url that you tried after deploying the application:http://192.168.111.24:8080/HI/login.jsp
Balasubramani Dharmalingam
Ranch Hand

Joined: Dec 06, 2004
Posts: 116
http://192.168.111.24:8080/HI/HI

Try this. Because u have given the "/HI" as url-pattern for login servlet.
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12806
    
    5
<servlet-class>login</servlet-class>

It appears your servlet is not in a package. This leads to all sorts of difficult to debug problems so you should adopt a policy of placing ALL classes used in servlets in a package and setting the references in web.xml accordingly.
Bill
Ramya reenu
Greenhorn

Joined: Nov 28, 2005
Posts: 13
I am creating a new project so in webapps i created a folder as"HI"then in which i have "WEB-INF" it has classes and lib folder then a web.xml.

My project starting page is "login.jsp" in which i have use

<form action="http://192.168.111.24:8080/check" method=GET>

two text box and a submit button.

placed the class file in a package com\conn\jdbc login.class

in web.xml i have written as
<servlet>
<servlet-name>log</servlet-name>
<servlet-class>com.conn.jdbc.login</servlet-class>
</servlet>

<servlet-mapping>
<servlet-name>log</servlet-name>
<url-pattern>/check</url-pattern>
</servlet-mapping>

but still i am facing the problem
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: http status 404 The requested resource is not available.