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: /usr/share/tomcat5.5-webapps/Beer-v1/WEB-INF/classes/com/example/web/BeerSelection.class
And my full path to the deployment descriptor is : /usr/share/tomcat5.5-webapps/Beer-v1/WEB-INF/web.xml
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 ]
Joined: Mar 12, 2003
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?
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 ]