File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Tocat  issue Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Tocat  issue" Watch "Tocat  issue" New topic

Tocat issue

Reghuram Variyam

Joined: Oct 31, 2006
Posts: 17
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

Joined: Oct 16, 2005
Posts: 1277
make sure you BeerV1 application is in tomcat_dir/webapps directory

SCJP 1.4 - 95% [ My Story ] - SCWCD 1.4 - 91% [ My Story ]
Performance is a compulsion, not a option, if my existence is to be justified.
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42959
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

Joined: Oct 31, 2006
Posts: 17
Thank you. The page is displaying after I created WEB-INF dir.
I agree. Here's the link:
subject: Tocat issue
It's not a secret anymore!