Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Deploying WAR files on Tomcat 4.0

 
Paul Medford
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm having a hard time deploying a war file on Tomcat 4.0 b7.
I created an examples.war file from within the examples directory. So the paths of all the files inside do not start with "examples".
I placed the examples.war file directly inside the webapps directory. And I did not change the server.xml file since there is already an Context entry with "examples" in it.
I deleted the entire "examples" directory. I restarted Tomcat. And it refuses to restart.
I've heard similar problems and I did not find the right answer.
Any idea?
Deploying a war is it just a matter of placing the war file inside a directory and registering it with the server.xml file or should we also un-war the files as well?
Thanks,
Francois
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13056
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tomcat should automatically un-war the file if the server.xml has been set correctly to match the war file name AND there is no matching directory already in the webapps directory. Therefore your war file needs be be in a new namespace, not examples.
Bill

------------------
author of:
 
Paul Medford
Ranch Hand
Posts: 33
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What do you mean by "to match the war file name"?
Based on my readings I thought that the Context tag in the server.xml file is supposed to make a reference to the named context (ie: test):
<Context path="/test" docBase="test" debug="0" reloadable="true">
1) Do I have to actually write "test.war" somewhere in the server/xml file?
2) Must I use the Manager app that comes with Tomcat? I'm still confused as to how to enable it.
Thanks,
Francois
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic