Hi to all,
I am preparing SCWCD exam using book Head First
Servlet &
JSP. I try to manually deploy on
Tomcat 5.5 third chapter exercise Beer-v1 with no success and I would like to understand the mistakes I make.
If I put the Beer-v1 webapps inside the folder:
C:\Programmi\Apache Software Foundation\Tomcat 5.5\webapps
I cannot browse the application.
I tryed to modify the C:\Programmi\Apache Software Foundation\Tomcat 5.5\conf\server.xml
adding this line at the host node:
<Context path="/Beer-v1" docBase="C:\Progammi\Apache Software Foundation\Tomcat
5.5\webapps\Beer-v1\"/>
but the modified version of server.xml:
<Host name="localhost" appBase="webapps"
unpackWARs="true" autoDeploy="true"
xmlValidation="false" xmlNamespaceAware="false">
<Context path="/Beer-v1" docBase="C:\Progammi\Apache Software Foundation\Tomcat
5.5\webapps\Beer-v1\"/
doesn't work.
Then I tryed to put the Beer-v1 app inside
C:\Programmi\Apache Software Foundation\Tomcat 5.5\webapps\ROOT
and from that folder I can access the index.html or the form.html but when I submit the form and I make the http request for the servlet I get the Error Report :
Http Status 404-/Beer-v1/SelectBeer.do, The requested resource (/Beer-v1/SelectBeer.do) is not available.
I have some questions:
1- I think the right deployment folder is
C:\Programmi\Apache Software Foundation\Tomcat 5.5\webapps
but why from there I cannot access any file of the webapp?
Why from C:\Programmi\Apache Software Foundation\Tomcat 5.5\webapps\ROOT
I can access at least the .html files?
2- How I have to modify the server.xml to manually deploy a new webapp? Is the modification line I added wrong?
In chapter one webapp ch1 I put the app into webapps, not ROOT, and browsing ( my Tomcat is on port 7072)
http://localhost:7072/ch1/Serv1
I can access the servlet and everything is right, with no change into the server.xml.
If I deploy with Netbeans Tomcat embedded (my is on port 8084) browsing
http://localhost:8084/Beer-v1/
I can access the
http://localhost:8084/Beer-v1/SelectBeer.do
and everything works right.
3- Is anybody studying Head First Servlet & JSP at the same stage so we could ask questions to each other?
Thank you for replying to these simple questions!!!