tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bjørge Solli <>
Subject Re: restart servlet from cron
Date Tue, 27 Dec 2005 10:25:19 GMT
Bjørge Solli wrote:
> wrote:
>> Here's what's in one of my ant files to stop a web app.  Start and 
>> restart are probably similar.
>> <taskdef name="tc-stop" classname="org.apache.catalina.ant.StopTask" />
>> <target name="tomcat-stop">
>>    <tc-stop
>>        url=""
>>        username="manager"
>>        password="managerpw"
>>        path="/${webapp}"
>>    />
>> </target>
> Thankyou. I am new to ant and cannot understand this error I get when I 
> run your example (changed the variables though):
> Buildfile: build.xml
> /home/bjorges/test/build.xml:1: Unexpected element "taskdef" taskdef
> Total time: 0 seconds
> For me it seems to be expecting some starttag or something. I know this 
> must be somewhat basic, so my guess is I am missing some understanding 
> of the xml-file. I did try to add a '<?xml version="1.0"?>' at the top, 
> but it did not change the error.
> All help appreciated!

Ah, I just needed the project-tag surrounding the rest. Knew it was 
something really simple.

My file now looks like this:
<?xml version="1.0"?>
<property name="catalina-ant.jar"
<taskdef name="tc-stop" classpath="${catalina-ant.jar}" 
classname="org.apache.catalina.ant.StopTask" />
<target name="tomcat-stop">

But still I get this error:
/home/bjorges/test/build.xml:5: taskdef class 
org.apache.catalina.ant.StopTask cannot be found

Where should ant find this? How should I update the classpath accordingly?


Bjørge Solli - Private cellphone: +47 91614343
Nansen Environmental and Remote Sensing Center - Bergen Reception: +47 55205800
Dept.: Mohn-Sverdrup Center for Global Ocean Studies
        and Operational Oceanography

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message