File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Tomcat and the fly likes Context in server.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Context in server.xml" Watch "Context in server.xml" New topic

Context in server.xml

Keith Lockey
Ranch Hand

Joined: Oct 05, 2001
Posts: 48
I try putting a context for database pooling in the server.xml, it works on my jbuilder and then when I switch over to the tomcat standalone, the war file will not unpack unless i take the context out. Not sure what to do?

Thanks,<br />Keith
Ken Krebs
Ranch Hand

Joined: Nov 27, 2002
Posts: 451
I found the same thing and I'm not sure why it works this way. BTW, You can also define a context in a separate whatever.xml file deployed in the webapps directory. I find this more maintainable and is especially useful if you aren't allowed access to server.xml. It still won't auto-unpack the war though. A cursory check of the Tomcat website and docs revealed nothing. I just live with it and unpack it manually. You could try posting the Tomcat site if nobody here knows.

kktec<br />SCJP, SCWCD, SCJD<br />"What we observe is not nature itself, but nature exposed to our method of questioning." - Werner Heisenberg
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

This has been around for a while, and it still annoys me.
I agree. Here's the link:
subject: Context in server.xml
It's not a secret anymore!