• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Tomcat 5.5 manual deployment

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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


 
Bartender
Posts: 4116
72
Mac TypeScript Chrome Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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?

 
Space pants. Tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic