• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Tomcat 4.0.2 unpacking wars

 
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I've upgraded from Tomcat 3 to Tomcat 4.0.2 and have lost the ability to
unpack wars. Here is a piece of my server.xml
<Host name="localhost" debug="0" appBase="webapps" unpackWARs="true">
<Context path="/PSP" docBase="PSP" debug="0" reloadable="true">
<Logger className="org.apache.catalina.logger.FileLogger"
directory="logs" prefix="PspContext." suffix=".txt"
timestamp="true"/>
</Context>
I use the following command to create my war file from within the PSP
directory
jar cfv PSP.war .
This worked great with Tomcat 3(something) but I get the following error
when tomcat 4 starts:
2002-03-04 10:17:09 StandardContext[/PSP]: Error initializing resources:
Document base C:\Tomcat402\webapps\PSP does not exist or is not a readable
directory
2002-03-04 10:17:09 StandardContext[/PSP]: Context startup failed due to
previous errors
2002-03-04 10:17:09 StandardContext[/PSP]:
It is correct that the PSP directory doesn't exist but shouldn't tomcat
create that directory when unpacking the war (which it doesn't do). Any
ideas on how to solve this problem?
Thanks in advance,
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you're on *nix, are there permission difficulties?
 
Jason Brawner
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm running Win2000pro.
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hm. That's interesting. I've duplicated your problem.

If there is a Context entry for your webapp in server.xml, then Tomcat seems completely unable to unpack the WAR. Remove the Context entry - no problem. But since you want to use a custom logger, it seems with Tomcat 4.x, you need to unpack that WAR yourself.

Have you checked the tomcat-users mail list for this issue? I used to subscribe, but getting several hundred emails a week was getting to be a bit much.

I've just now searched through my Outlook (lookout?) archive of that user list... this seems to be a known (but ignored?) problem in both TC 401 and 402. Someone claims it was fixed in (their words) "TC 402b2". This someone is a user, and not a Tomcat team-member. Perhaps just check out the latest and greatest version from their CVS (haha... wait for it!) and try building it. Yah, I thought that would sound funny.
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hmm...

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4829

Looks like if Remy has anything to do with it, this 'bug' (I'm sure they think of it as a feature) will remain.

His final word seems a bit arrogant to me.

Just saw this other one, which is a pretty succinct summary of the above bug.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2914
[ March 06, 2002: Message edited by: Mike Curwen ]
 
Jason Brawner
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mike, thanks for the reply.
I've asked this question to the tomcat-user group with no reply. However, I was unaware that it would work if I removed the context entry. I can do without the logger!
Thanks,
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm somewhat upset by the "tough, deal with it" attitude. It's more like Microsoft to make a feature disappear, and claim it was never proper behaviour.

I have thought of this for some time, and I can't see a reason why the behaviour of dynamically unpacking a WAR file, where an existing Context exists, is a bad thing. In fact, it's the opposite in my mind. Why wouldn't someone want this behaviour?

However, in the tradition of software vendors everywhere, I'll answer my own question. "If you want that feature, you're free to implement it yourself. It's open source."

nice.
 
What's that smell? I think this tiny ad may have stepped in something.
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic