wood burning stoves 2.0*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes Tomcat 5.5 manual deployment Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "Tomcat 5.5 manual deployment" Watch "Tomcat 5.5 manual deployment" New topic
Author

Tomcat 5.5 manual deployment

stefania ferrarelli
Greenhorn

Joined: Jul 26, 2009
Posts: 29

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!!!


Vijitha Kumara
Bartender

Joined: Mar 24, 2008
Posts: 3816

I think the right deployment folder is C:\Programmi\Apache Software Foundation\Tomcat 5.5\webapps

Correct.
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.

That's the correct way to do that, may be you have done something different this time? How is your applications structured?


SCJP 5 | SCWCD 5
[How to ask questions] [Twitter]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat 5.5 manual deployment
 
Similar Threads
Problem: requested resource not available
compilation error
HTTP Status 404 - /Ch1/Serv1
servlets
Package does not exist ?