Win a copy of Terraform in Action this week in the Cloud forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

404 File not found

 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have created one application folder as

C:\Program Files\Apache Software Foundation\Tomcat 4.1\webapps\oneapp

and saved one html file in it like this:

C:\Program Files\Apache Software Foundation\Tomcat 4.1\webapps\oneapp\form1.html

and tried running tomcat like this:

http://localhost:8080/oneapp/form1.html


What I m getting is :

[[[
HTTP Status 404 - /Beer/form.html

type Status report

message /Beer/form.html

description The requested resource (/Beer/form.html) is not available.
Apache Tomcat/4.1.34

]]]

when i m saving same form1.html as index.html in ROOT directory,it is working fine on running like this :

http://localhost:8080

Can somebody tell me why it is happening.
[ September 16, 2007: Message edited by: Bear Bibeault ]
 
hemant chaudhary
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
One more doubt

when i m trying to access index file like this :

http://localhost:8080...its working.

but when i m trying to access it like this :

http://localhost:8080/ROOT/index.html

it is again giving 404 error

Please enlighten me.
 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
A web application has four parts:

A public directory
A WEB-INF/web.xml file
A WEB-INF/classes directory
A WEB-INF/lib directory

The public area is the root of the application, excluding the WEB-INF directory. In your case it's located at C:\Program Files\Apache Software Foundation\Tomcat 4.1\webapps\ROOT

If you place form1.html there http://localhost:8080\form1.html will serve it.

You can go ahead and create the directory
C:\Program Files\Apache Software Foundation\Tomcat 4.1\webapps\ROOT\beer

And place there the form.html file.

http://localhost:8080\beer\form.html will serve it.

Regards,
Dan
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic