Meaningless Drivel is fun!
The moose likes Tomcat and the fly likes Deploying a webapp in Tomcat5.5 manager Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Deploying a webapp in Tomcat5.5 manager" Watch "Deploying a webapp in Tomcat5.5 manager" New topic

Deploying a webapp in Tomcat5.5 manager

donald rieck
Ranch Hand

Joined: Mar 12, 2003
Posts: 75
Hello out there,

I'm working in "Head First - Servlets and JSP", and trying to get tomcat5.5 to deploy a webapp I created.

In the manager "Deploy" section if gives 3 text boxes:

Context Path(option):____________________________
XML Configuration file URL:___________________________
War or Directory URL:______________________________

I've got my base app as /usr/share/tomcat5.5-webapps/Beer-v1/
(debian linux)

In it is a form.html file and a WEB-INF directory.
In my WEB-INF dir is my web.xml deployment descriptor and a classes dir.
In the classes dir is my com dir.
In the com dir is a example dir.
In the example is the web dir which contains my BeerSeclection.class file.
Hence my full path to my class is:

And my full path to the deployment descriptor is :

Now! what do I put in any/which/ of the 3 text boxes in the "Deploy" section of the tomcat manager.

I have tried and tried and tried many combinations, to no avial.
Full paths.
If I don't fill the Context Path it gives a error message:
invalid context path.

The best error message I've gotten is a "invalid context path"

I'm really digging for examples.
Do I have problem with the deployment descriptor(it is right out of
the book)?

Examples anyone? Hints?

[ May 26, 2007: Message edited by: donald rieck ]
donald rieck
Ranch Hand

Joined: Mar 12, 2003
Posts: 75
I've got a work-around! Yea, so for now I'll put a configuration context file for my app in the .../tomcat5.5/conf/Catalina/localhost/ dir.

This puts a context app in the manager, but I can't launch it from there?

Anyhow, it's a start.

John Peters

Joined: May 25, 2007
Posts: 18
I've never used the manager to deploy, but it might be easier to copy the app over to the $TOMCAT_HOME/webapps directory (make sure it conforms to the deployment environment on page 73 of the HF book).

Or you could jar it up and drop it into the $TOMCAT_HOME/webapps dir for an auto-deploy! :thumb:
How I did it:

If I got my syntax right, that will war all the correct files up (it gives you a listing at the end). Just start tomcat, tail catalina.out copy the myproject.war over to $TOMCAT_HOME/webapps directory and make sure it deploys correctly.

[ May 31, 2007: Message edited by: John Peters ]
[ May 31, 2007: Message edited by: John Peters ]
I agree. Here's the link:
subject: Deploying a webapp in Tomcat5.5 manager
It's not a secret anymore!