• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Tocat issue

 
Reghuram Variyam
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 ?
 
Niranjan Deshpande
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
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic