ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Kjome <h...@visi.com>
Subject Re: JNDI with Ant
Date Wed, 04 Jun 2003 13:33:01 GMT

Are you talking abou the catalina ant manager tasks?

If so, Tomcat-4.1.x allows the use of context configuration files which are 
files which are outside of server.xml, but read as if in server.xml.  They 
contain a single <Context ...> entry along with the normaly allowed nested 
elements (including DBCP JNDI datasource config).

To use this with the ant tasks, do....


     <target name="catalina-install" depends="compile,manager.init"
             description="Install application to servlet container" >
         <catalina-install
             url="${manager.url}"
             username="${manager.username}"
             password="${manager.password}"
             config="${app.ccf}"
             path="${app.path}" />
     </target>

notice the "config" attribute.  That points to a context configuration file 
which will be used by Tomcat upon the manager install

OR

     <target name="catalina-deploy" depends="war,manager.init"
             description="Deploy web-app war" >
         <echo message="${app.war}"/>
         <catalina-deploy
             url="${manager.url}"
             username="${manager.username}"
             password="${manager.password}"
             path="${app.path}"
             war="${app.war}" />
     </target>

In this case, we are deploying a .war file and there is no "config" 
attribute.  However, Tomcat allows for adding a "context.xml" file to the 
"META-INF" directory within the .war file.  This will be used as the 
context configuration file for this context.  Minimal configuration would 
look like...

<Context path="/myapp" docBase="myapp.war" />


Does that answer your question?

Jake

At 06:15 PM 6/4/2003 +0530, you wrote:
>Hi I am trying to Deploy my Web Application using Ant which is Accessing
>Database using JNDI Context of database file.
>
>Now for JNDI i have to make change in server.xml.so that web Application can
>use that Context.but presently.I am doing it manually
>
>but if i want it to be automatically then how can we do it.
>
>Is there any way of doing it or we always have to add text into server.xml
>for JNDI context.
>
>plz help me.
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message