• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

Tomcat 5.5 manual deployment

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
  • 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: 4101
63
Hibernate Fedora Chrome
  • Mark post as helpful
  • send pies
  • 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?

 
Don't get me started about those stupid light bulbs.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!