Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

WAR files with Tomcat 4.1

 
Michael Mendelson
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Strangely, I can't get tomcat 4.1 to unpack my WAR files! The war file deploys in tomcat 4.0, and was constructed using ant.

The server.xml file has no context explicitly set up for this war, and has the following configuation (I think this is out of the box):

The log file shows the following:

...BUT... When I look at the jar the MANIFEST.MF file seems to be there:

Any ideas, anyone? Thanks.
 
Tim Holloway
Saloon Keeper
Posts: 18303
56
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think I got the identical situation under an earlier Tomcat - maybe even a 3.x one. I'm not yet able to run Tomcat 4.1 because my EJB server currently only work up to 4.06, so it's not exclusively an Tomcat 4.1 problem.
Unfortunately, I don't remember how I fixed it. You MIGHT be able fix it by manually purging any previous unpacked WAR (delete the unpacked directories in $TOMCAT_HOME/webapps AND in "$TOMCAT_HOME/work/localhost/".
If that doesn't make it happy, what I'd do is ZIP/tar the existing tomcat directory in its entirety and remove the original (e.g. "-m" option on ZIP) so that you can retrieve config files as needed, then re-install Tomcat4 from scratch.
Wish I could be more specific, but I DO know that Tomcat doesn't bother to purge certain things that it would be safer if it did, such as stale webapp files.
Good luck!
Tim
 
Jason Vogel
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I can't promise this is the answer, but I just installed Tomcat 4.1.18 last night. I was trying to play with Struts, and I couldn't get it to unpack my WAR files. I had them in a directory "struts" under "webapps". I read one post that could be your issue and then how I solved my issue. The post said something like "that TC won't unpack a WAR file if there is already a directory of the same name there..." Sounds a little funny, but it made me question my directory structure. Once I moved my WAR files up a directory, then TC immediately, automatically unpacked them.
Just an idea,
Jason
 
Michael Mendelson
Ranch Hand
Posts: 73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey guys, thanks for your responses! It was a permissions issue.
Here's my confession - I know a lot about java but have done much of my development on Windoze boxes. I'm still working out permissions issues on these Linux machines. More often than not, that's the cause of my concerns.
When the RPM created the directories, for some reason it didn't give group write permissions to the webapps directory! Perhaps I shouldn't have run the install as root!
Anyway, I fixed it with

...and that did it!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic