permaculture playing cards*
The moose likes Tomcat and the fly likes tomcat cant find my form.html? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "tomcat cant find my form.html?" Watch "tomcat cant find my form.html?" New topic
Author

tomcat cant find my form.html?

kyro gue
Greenhorn

Joined: Jan 05, 2010
Posts: 12
hi, i am following a head first servlets and jsp chapter 3 example, whereby i create a form.html , inside is purely html codes, and i put it in C:\tomcat\webapps\Beer-V1 . when i access http://localhost:8080/Beer-V1/form.html , i cant find the file. why is that? i have set my JAVA_HOME, CLASSPATH, and TOMCAT_HOME, tomcat_home is C:\tomcat . why is it that tomcat cant locate a simple file ? and if i understand the web.xml file should not have a relation with a HTML file , rather it is more for mapping a servlet.

Error message:
type Status report

message

description The requested resource () is not available.
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6662
    
    5

Is the application in the deployed state ?

Are you able to access the servlets in the application ?


SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
kyro gue
Greenhorn

Joined: Jan 05, 2010
Posts: 12
servlets yes, what do you mean deployed state?
Deepak Bala
Bartender

Joined: Feb 24, 2006
Posts: 6662
    
    5

Deployed state = The application has been deployed on the container.

Where did you place form.html ?
kyro gue
Greenhorn

Joined: Jan 05, 2010
Posts: 12
C:\tomcat\webapps\Beer-V1 folder

Sai Nara
Greenhorn

Joined: Dec 29, 2004
Posts: 5
Avoid using -. Try to rename directory to BeerV1. Check the console for any exceptions. If you see any exception paste it here.
kyro gue
Greenhorn

Joined: Jan 05, 2010
Posts: 12
it still cant find it. i attached a image to show my directory etc.
Prakash Mani - Attur
Ranch Hand

Joined: Oct 08, 2009
Posts: 100
servlets working? it looks like you do not have the context path for 'BeerV1' app.. please check out server.xml and reply.. clean your work directory before you try..
venkatesh polneedi
Greenhorn

Joined: Nov 25, 2010
Posts: 3
i think you miss to set classpath for servlet-api.jar or it may be problem in your web.xml file...s,gothrough that
kyro gue
Greenhorn

Joined: Jan 05, 2010
Posts: 12
i currently do not have a servlet , i am just trying to access a plain html page using tomcat . i do not know how to edit the server and web.xml . what im doing is just following the head first servlets and jsp instructions and it cant work ;/
kyro gue
Greenhorn

Joined: Jan 05, 2010
Posts: 12
FIXED, it appears there was a typo error of the web.xml

Correct version:


What i did:


did not pay much attention into the doctypes because i thought those were just stuffs that denote a document.
venkatesh polneedi
Greenhorn

Joined: Nov 25, 2010
Posts: 3
your dtd information is not a problem...i think after deploy the application status of your project is false.this is due to syntax wrong in your web.xml..examine that one
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: tomcat cant find my form.html?