This all is the hierarchy where i have put up my files.
Now i have started apache tomcat 5.5 and wrote in the browser
http://localhost:8080/form.html then my form APPEARS.
when i select an option and click on button, I get an error:
HTTP Status 404 - /beer/selectbeer.do
type: Status report
description: The requested resource (/beer/selectbeer.do) is not available.
Now, I engaged all my mind in resolving the error, but can't sort out that.
So, I request you to have a look and sort out my problem..
If you're deploying to the ROOT context then your classes should be in ROOT/WEB-INF/classes. Right now it looks like you couldn't decide if you wanted to deploy to root or to beer, so sort of did both. But it won't work like that :)
Joined: May 14, 2010
I couldn't understand the meaning of ROOT CONTEXT. will anyone please elaborate this. and what will be the difference if i deploy it to the ROOT directory.
Take your beer folder from ROOT and put it in webapps, it should work...
ROOT Context means, ROOT is the project folder(like how beer is for your project now..). If you deploy it to ROOT directory, you should put all your classes in ROOT/WEB-INF/classes folder..
Joined: May 14, 2010
the issue is resolved.
Simply i put my beer folder in webapps, and it worked.
but one thing , i am not able to understand..that earlier when my beer folder was in folder webapps/root/, then i was typing in the browser:
and this time when i put my beer folder in webapps, then also i am typing the same thing
webapps is the deploy folder of tomcat, which means, http://localhost:8080/beer/form.html will search for beer inside webapps, and then locate the form.html inisde beer.. if you put your beer inside Root, beer will not be an deployable project...
In Tomcat, ROOT is mapped to /, so in the above URL, /beer/form.html will be searching for beer inside ROOT and form.html inside beer, which is there so, it will present you the html. As, I told you, since it is not a deployable project, server will not register the servlets written by you inside that folder, so you get resource not found exception...