File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes HTTP 404 error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "HTTP 404 error" Watch "HTTP 404 error" New topic
Author

HTTP 404 error

shanthisri mocherla
Ranch Hand

Joined: Sep 05, 2005
Posts: 119
hello Friend
I'm getting this error when I 'm trying to exceute my form.html from the the browser .
I'm typing this in my browser.
http://localhost:8080/serv1/form.html

The error is HTTP status 404 -/serv/form.html.

The requested resource (/serv1/form.html) is not available.

Actually this code worked fine foe me when I tried it a month ago.But Strangely it is not working right now.??
I've been struggling with this code since yesterday.
serv1 is the directory under webapps directory.

Can anyone tell me what could be the problem???Is it something to do with the web.xml or classpath??
I dont think so.

Shanthi
Martyn Clark
Ranch Hand

Joined: Apr 16, 2005
Posts: 108
Hi
Have you checked to make sure the app is loading if your running tomcat go to manager page and reload if it is not loading then the problem is your web.xml.
It would not be classpath seens as it is just an html page.


Martyn...<br /> <br />SCJP 1.4 SCWCD 1.4
shanthisri mocherla
Ranch Hand

Joined: Sep 05, 2005
Posts: 119
Hi Martyn
I'm gettig the form.html executed when I'm using http://localhost:8080/servlet-examples/form.html where in servlet-examples is the directory I got along with the TomCat .the path is

XXX/TomCat5.0/webapps/servlet-examples/form.html.
But when I'm trying to execute the form.html from the serv1 directory which I've created, it is not getting executed.
i dont know what's happening.

Thanks for your reply
Shanthi
Martyn Clark
Ranch Hand

Joined: Apr 16, 2005
Posts: 108
Hi shanthisri
yes this will work because the servlet-examples will be loaded by default so you know that one is running. Have you checked with tomcat manerger to see which apps are loading when you start tomcat if you just go to localhost/ and click manager on to left side of page it will ask you to log in then you can tell if serv1 is running just to make sure if you clik reload on that page at the very top you will get a message in plain text to tell you if it loaded ok.
if not take another look at the web.xml file for that app, just a silly little spelling mistake will stop it from loading.
shanthisri mocherla
Ranch Hand

Joined: Sep 05, 2005
Posts: 119
Hi Martyn

At last
my code started working.i think I had some typos in my web.xml.I checked each and every line in my web.xml.

As you suggested ,I'm trying to go to Manager page in tomcat, it is asking me to log in.I dont know what to type in username and password fields.
Thank you very much fro your help.

Shanthi
[ January 25, 2006: Message edited by: shanthisri mocherla ]
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

There is a file called tomcat-users.xml in the conf directory of Tomcat.
Check the name and password of the administrator.


[My Blog]
All roads lead to JavaRanch
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HTTP 404 error