H
harryos
i wrote an ant target to start tomcat manager with url,usrname,passwd
read from a build.properties file.
<property file="build.properties" />
<taskdef name="start" classname="org.apache.catalina.ant.StartTask"
classpath="${tomcat.dir}/lib/catalina-ant.jar" />
<taskdef name="stop" classname="org.apache.catalina.ant.StopTask"
classpath="${tomcat.dir}/lib/catalina-ant.jar" />
<path id="classpath">
<fileset dir="${tomcat.dir}/lib">
<include name="*.jar"/>
</fileset>
</path>
<target name="init" description ="creating build and dist
directories">
<mkdir dir="${build.dir}"/>
<mkdir dir="${dist.dir}"/>
<property name="context-path" value="" />
</target>
<target name="start-tomcat" depends="init">
<start url="${url}" username="${username}" password="${password}"
path="${context-path}"/>
</target>
-------------------
in build.properties file i wrote
tomcat.dir=E:/tomcat/apache-tomcat-6.0.18
url=http://localhost:8080/manager
username=admin
password=admin
---------------------------
when i run 'ant start-tomcat' ,it causes an error '
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method) ,Can
someone help me with this?What do i need to do to get tomcat started?
thanks
harry
read from a build.properties file.
<property file="build.properties" />
<taskdef name="start" classname="org.apache.catalina.ant.StartTask"
classpath="${tomcat.dir}/lib/catalina-ant.jar" />
<taskdef name="stop" classname="org.apache.catalina.ant.StopTask"
classpath="${tomcat.dir}/lib/catalina-ant.jar" />
<path id="classpath">
<fileset dir="${tomcat.dir}/lib">
<include name="*.jar"/>
</fileset>
</path>
<target name="init" description ="creating build and dist
directories">
<mkdir dir="${build.dir}"/>
<mkdir dir="${dist.dir}"/>
<property name="context-path" value="" />
</target>
<target name="start-tomcat" depends="init">
<start url="${url}" username="${username}" password="${password}"
path="${context-path}"/>
</target>
-------------------
in build.properties file i wrote
tomcat.dir=E:/tomcat/apache-tomcat-6.0.18
url=http://localhost:8080/manager
username=admin
password=admin
---------------------------
when i run 'ant start-tomcat' ,it causes an error '
java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method) ,Can
someone help me with this?What do i need to do to get tomcat started?
thanks
harry