aspose file tools*
The moose likes Servlets and the fly likes accessing html file under tomcat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "accessing html file under tomcat" Watch "accessing html file under tomcat" New topic
Author

accessing html file under tomcat

vineeta gup
Greenhorn

Joined: Oct 25, 2004
Posts: 3
just started on head first servlets and jsp.
am stuck on ch3. have form.html at tomcat\webapps\Beer-v1\form.html. when i type http://localhost:8080/Beer-v1/form.html get error-404. how to access form.html??
Praful Thakare
Ranch Hand

Joined: Feb 10, 2001
Posts: 637
Check if this url http://localhost:8080/Beer-v1/ gives 404 error or displays files under Beer-v1,If it displays files then It will show form.html as well.
if it gives 404 then I guess your Beer-v1 webapp is not registered.
one of the way to register it is create a xml file called Beer-v1.xml under tomcat\webapps\Beer-v1\ with following content and restart your tomcat



Cheers
-Praful
[ October 25, 2004: Message edited by: Praful Thakare ]

All desirable things in life are either illegal, banned, expensive or married to someone else !!!
vineeta gup
Greenhorn

Joined: Oct 25, 2004
Posts: 3
tried making the Beer-v1.xml file as suggested. i still get the Http error 404 when i type http:\\localhost:8080\Beer-v1\form.html.
Fisher Daniel
Ranch Hand

Joined: Sep 14, 2001
Posts: 582
Hi Vineeta Gup,
You should try to go http://localhost:8080/Bear-v1
If there is error 404, you should check whether you have provided the proper web.xml on your web application and tomcat configuration files to register your web application.
If there is no error 404, you should check whether you have pleced form.html in the right directory.
I mean here your html files is not inside WEB-INF directory.

Hope this helps...
Correct me if I am wrong
thanks
daniel
vineeta gup
Greenhorn

Joined: Oct 25, 2004
Posts: 3
hi Praful Thakre, Daniel Fisher
thanx for the help. the html is working now.
vineeta
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: accessing html file under tomcat