You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Daniel Gresh <dg...@lle.rochester.edu> on 2007/03/01 20:27:05 UTC

Re: Ant custom tasks: how to compile .java files and restart Tomcat (Tomcat6.0.9)? [RESOLVED]

Daniel Gresh wrote: 
> Alright, here is where I am now.
>
> I edited my build.xml file to include a reload command to reload my 
> $CATALINA_HOME/webapps/ROOT path. I go to the directory where my .java 
> files are and type "ant reload". Everything in the build.xml file 
> works fine until it reaches reload. Once it reaches reload, I get the 
> following message:
>
> reload:
>    [reload] FAIL - No context exists for path 
> /u/dgresh/apache-tomcat-6.0.9/webapps/ROOT
>
> BUILD FAILED
> /u/dgresh/dev/kdb/src/kdb4/build.xml:44: FAIL - No context exists for 
> path /u/dgresh/apache-tomcat-6.0.9/webapps/ROOT
>
> I do not understand this. In the example build.xml file provided on 
> the Apache Tomcat website, it says this:
>
>  The "reload" signals the specified application Tomcat 5 to shut 
> itself down
>  and reload. This can be useful when the web application context is not
>  reloadable and you have updated classes or property files in the
>  /WEB-INF/classes directory or when you have added or updated jar 
> files in the
>  /WEB-INF/lib directory.
>
>
> I am updating classes in the /WEB-INF/classes directory, which is why 
> I want to reload the application. Is there something I am missing? Is 
> there something I need to include in $CATALINA_HOME/webapps/ROOT to 
> make it a web application so Ant can recognize the context?
>
> Thanks for the help,
> Dan
>
> ---------------------------------------------------------------------
> To start a new topic, e-mail: users@tomcat.apache.org
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
Hi list,

I resolved this problem. It turns out that I shouldn't have specified 
the full path; I took another look at the Tomcat docs and the 
manager/html page, and realized that when I run a manager task it will 
automatically read from the $CATALINA_HOME/webapps directory. Therefore, 
I changed my path in build.xml to "/", and voila -- it reloaded ROOT! 
Now I can create my own webapp separate from ROOT, and use Ant tasks!

Thanks a lot for the help you've been giving me as I'm getting familiar 
with Tomcat,
Dan

---------------------------------------------------------------------
To start a new topic, e-mail: users@tomcat.apache.org
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org