• 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: problem with server.xml context

 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I recently added db connection pooling to a working webapp, and have run into a problem I can't seem to solve with the deployment of this app in Tomcat.
Tomcat 4.1.12
I added a new context to server.xml in order to define the dbcp.
With this context in place, the app's war file no longer unpacks, but instead Tomcat raises an exception that the document base does not exist.
Here's the top of the exception stack:
(with app names changed to protect the innocent)

My docBase ( in server.xml ) for this context is the directory name into which I'd like the war file to unpack - same directory it was unpacking into prior to adding the context.
If I change the docBase to be the war file itself, the app runs without unpacking. ( eg: docBase="myapp.war" ).
I do have unpackWARs set to "true", as it was before.
The trouble is, I'd like to be able to unpack and serve some of the static content out of the webapp's docBase from Apache httpd. Without unpacking, it's not possible.
I'm stumped.
 
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
Ken... is this related? I've found the same problem with 4.1.12, and it goes back to the initial 4.x releases...

https://coderanch.com/t/81715/Tomcat/Tomcat-unpacking-wars
 
this is supposed to be a surprise, but it smells like a tiny ad:
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