1. build your war file using ant war directive. Below is my build target:

                <war destfile="${dist}/${war.file}"
webxml="${basedir}/etc/web.xml">
                        <!-- copy *.jsp to WEB-INF -->
                        <fileset dir="${basedir}/web"/>
                        <!-- copy web.xml, dtds and tlds to WEB-INF/etc -->
                        <zipfileset dir="${basedir}/etc"
excludes="**/web.xml" prefix="WEB-INF"/>
                        <!-- copy *.class to WEB-INF/classes -->
                        <classes dir="${basedir}/classes"/>
                        <!-- copy 3rd party jars to WEB-INF/lib -->
                        <lib dir="${basedir}/lib"/>
                        <!-- copy *.xml to WEB-INF/conf, excluding
*.properties and context.xml -->
                        <zipfileset dir="${basedir}/conf"
excludes="**/*.properties **/context.xml" prefix="WEB-INF/conf"/>
                        <!-- copy context.xml to META-INF -->
                        <zipfileset dir="${basedir}/conf"
includes="**/context.xml" prefix="META-INF"/>
                        <!-- copy *.properties to WEB-INF/classes -->
                        <zipfileset dir="${basedir}/conf"
includes="**/*.properties" prefix="WEB-INF/classes"/>
                        <!-- copy images to px -->
                        <zipfileset dir="${basedir}/px" prefix="px"/>
                </war>

2. deploy using catalina-ant task

<deploy url="http://localhost:8080/manager"; username="admin"
password="${password}" path="/testws" war="${war.url}" update="true"/>

War.url is, on windows, file:/h:/eclipse/workspace/testws.war

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] 
Sent: October 19, 2004 5:28 PM
To: Tomcat Users List
Subject: RE: Deployment with tomcat 5


Thanks, I have to following Ant Script and it is
running very well.

<project name="tests.webservices" default="deploy"
basedir=".">

        <property name="tomcat.home"
value="D:/apps/dev/apache/jakarta/tomcat/5.0.28" />


        <!-- Configure the context path for this application
-->
        <property name="path" value="/tstws" />

        <!-- Configure properties to access the Manager
application -->
        <property name="url"
value="http://localhost:8080/manager"; />
        <property name="username" value="admin" />
        <property name="password" value="admin" />

        <path id="def.classpath">
                <fileset dir="${tomcat.home}/server/lib">
                        <include name="**/*.jar" />
                </fileset>
        </path>

        <!-- Configure the custom Ant tasks for the Manager application -->
        <taskdef name="deploy"
classname="org.apache.catalina.ant.DeployTask"
classpathref="def.classpath" />
        <taskdef name="reload"
classname="org.apache.catalina.ant.ReloadTask"
classpathref="def.classpath" />
        <taskdef name="undeploy"
classname="org.apache.catalina.ant.UndeployTask"
classpathref="def.classpath" />

        <!-- Executable Targets -->

        <target name="deploy" description="Install web
application">
                <deploy url="${url}" username="${username}"
password="${password}"
config="file:///h:/eclipse/workspace/tests.webservices/META-INF/context.xml"
path="/tstws" localwar="file:///h:/eclipse/workspace/tests.webservices"
/>
        </target>

        <target name="reload" description="Reload web
application">
                <reload url="${url}" username="${username}"
password="${password}" path="${path}" />
        </target>

        <target name="undeploy" description="Remove web
application">
                <undeploy url="${url}" username="${username}"
password="${password}" path="${path}" />
        </target>

</project>

 --- Phillip Qin <[EMAIL PROTECTED]> a écrit
: 
> If you use Tomcat Manager or catalina-ant.jar,
> package context into META-INF
> in the war file.
> 
> 
> 
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Sent: October 19, 2004 3:44 PM
> To: [EMAIL PROTECTED]
> Subject: Deployment with tomcat 5
> 
> 
> How can I indicate to tomcat 5 for reading my
> context.xml for a host in an outside path of $catalina_home/conf, for
> instance in d:\mytomcat\hosts\webapps?
> 
> =====
> Patrick GIRY
> e-mail : [EMAIL PROTECTED]
> 
> 
>       
> 
>       
>               
> Vous manquez d'espace pour stocker vos mails ?
> Yahoo! Mail vous offre GRATUITEMENT 100 Mo !
> Créez votre Yahoo! Mail sur
> http://fr.benefits.yahoo.com/
> 
> Le nouveau Yahoo! Messenger est arrivé ! Découvrez
> toutes les nouveautés
> pour dialoguer instantanément avec vos amis. A
> télécharger gratuitement sur
> http://fr.messenger.yahoo.com
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
> 
>  

=====
Patrick GIRY
e-mail : [EMAIL PROTECTED]


        

        
                
Vous manquez d'espace pour stocker vos mails ? 
Yahoo! Mail vous offre GRATUITEMENT 100 Mo !
Créez votre Yahoo! Mail sur http://fr.benefits.yahoo.com/

Le nouveau Yahoo! Messenger est arrivé ! Découvrez toutes les nouveautés
pour dialoguer instantanément avec vos amis. A télécharger gratuitement sur
http://fr.messenger.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


!DSPAM:417586dc4179145415709!

Reply via email to