Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Tocat issue

 
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Iam trying the first exercise in HF book. I created static html form.html and placed it in webapps/Beer-v1 directory in tomcat. After starting tomcat, I typed http://localhost:8080/Beer-v1/form.html in browser. But iam getting a http error404 with message resource not available.

I then copied my form.html to webapps/servlet-examples(servlet-examples direcory was already present after I installed tomcat)and tried http://localhost:8080/servlet-examples/form.html and I found that form is getting displayed correctly in my browser.

Any one know why the static html page is not getting displayed from Beer-v1 directory ?
 
Ranch Hand
Posts: 1277
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
make sure you BeerV1 application is in tomcat_dir/webapps directory
 
Rancher
Posts: 43016
76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In order for the Beer-v1 directory to be recognized as a web app, create a directory called "WEB-INF" inside of it. That tells Tomcat that it should serve content out of Beer-v1.
 
Reghuram Variyam
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you. The page is displaying after I created WEB-INF dir.
 
Won't you be my neighbor? - Fred Rogers. 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
    Bookmark Topic Watch Topic
  • New Topic