Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

accessing html file under tomcat

 
vineeta gup
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 642
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
vineeta gup
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 582
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Praful Thakre, Daniel Fisher
thanx for the help. the html is working now.
vineeta
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic