You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Christopher A. Brooks" <ca...@mail.usask.ca> on 2004/06/23 15:56:02 UTC

Defining data sources in context only

Hi,

My problem is as follows.  I would like to have an ant script that
auto-deploys my webapp into Tomcat 5 including any data source resources it
might need (e.g. Database connections).  Thus far I have only been able to
define these resources in the server.xml file, which means my deployment
process requires two steps (deploy, then beg my admin to change my data
source references in the server.xml).

What are the best practices for a "one click deploy" with tomcat?  Thanks in
advance,

Chris


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Defining data sources in context only

Posted by QM <qm...@brandxdev.net>.
On Wed, Jun 23, 2004 at 07:56:02AM -0600, Christopher A. Brooks wrote:
: My problem is as follows.  I would like to have an ant script that
: auto-deploys my webapp into Tomcat 5 including any data source resources it
: might need (e.g. Database connections).  Thus far I have only been able to
: define these resources in the server.xml file, which means my deployment
: process requires two steps (deploy, then beg my admin to change my data
: source references in the server.xml).
: 
: What are the best practices for a "one click deploy" with tomcat?  Thanks in
: advance,

Have you looked into "context.xml"?
See the Tomcat docs for details -- this may be what you're after.

The context.xml file contains a context's (webapp's) <Context> element
from server.xml, but it stays with the webapp.  iow, no more need to
disturb the global server.xml for deployments.

-QM

-- 

software  -- http://www.brandxdev.net
tech news -- http://www.RoarNetworX.com


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Defining data sources in context only

Posted by Jacob Kjome <ho...@visi.com>.
Quoting "Christopher A. Brooks" <ca...@mail.usask.ca>:

> Hi,
> 
> My problem is as follows.  I would like to have an ant script that
> auto-deploys my webapp into Tomcat 5 including any data source resources it
> might need (e.g. Database connections).  Thus far I have only been able to
> define these resources in the server.xml file, which means my deployment
> process requires two steps (deploy, then beg my admin to change my data
> source references in the server.xml).
> 
> What are the best practices for a "one click deploy" with tomcat?  Thanks in
> advance,
> 

Put at "context.xml" file in the WAR file's META-INF directory.  The root
element is <Context> and includes anything that a normal <Context> has in
server.xml.  Deploy and you're set to go.

Jake

> Chris
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org