Ivan Luzyanin wrote: > Hi! > > Is there any way to deploy (redeploy) cocoon without restarting Tomcat? > I tried to use "deploytool", but unsuccessfull (100 "Class not found" errors > when accessing http:/localhost:8080/cocoon).
Yes. If you are using Tomcat 4.1 it's quite simple, but I struggled for a couple of days with the fact that it would deploy but wouldn't compile XSP pages. Thanks to Vadim, I found out that this is due to a missing feature in 2.0.3 that has been added in 2.0.4-dev and 2.1-dev (look for manifest-tool in build.xml). I can now deploy wars to a running Tomcat instance, even on a remote server, via Tomcat's Manager App. This is what you should do: Set up authorizations for the Tomcat Manager App as explained in http://jakarta.apache.org/tomcat/tomcat-4.1-doc/manager-howto.html Insert a couple of targets like the following in your Ant buildfile: <target name="deploy" description="Deploy web application" depends="war"> <deploy url="${url}" username="${username}" password="${password}" path="${path}" war="file:${dest}/myapp.war"/> </target> <target name="undeploy" description="Undeploy web application" depends="init"> <undeploy url="${url}" username="${username}" password="${password}" path="${path}"/> </target> You should of course set approprate values for the various Ant properties. ${url} should be something like http://servername:8080/manager. You can now do: ant deploy or ant undeploy and Tomcat will deploy (or undeploy) and start you application just fine. The war file is sent to Tomcat over HTTP PUT, so you don't need to copy it manually to the server. Just have a "war" Ant task that builds the war file in ${dest}/myapp.war. Hope this helps (ant thanks to Vadim), Ugo -- Ugo Cei - http://www.beblogging.com/blog/ --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>
