tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alberto Romero <>
Subject Tomcat 5.0.28 Deploy apps in a /dir/appname like Context
Date Tue, 08 Feb 2005 19:14:42 GMT
What does work: deploying app in a /appname Context
- I defined a host myhost with a /hostappbase dir as
- I took the sample HelloWorld app, renamed myapp and
wanted it as http://myhost/myapp
- I added a META-INF/context.xml file
- I compiled it with "ant all" using a build.xml like
the one from
- Then compiled and validated the jsp with "ant -f
deploy.xml compile" where deploy.xml is like build.xml
example from tomcat-deployer-5.0.28
- I also modified the jar destfile to    <jar
destfile="/hostappbase /${webapp}.war" so after
compile, Tomcat automagically detects the new .war and
unpacks it and loads the new application
=> Navigation, reloading and even restarting the new
app OK
- I tried "ant -f deploy.xml deploy"
=> Tomcat manager undeploy and again redeploy the
application, everithing OK.

What does NOT work: deploying similar app in a
/dir/appname Context
- I want a copy of HelloWorld, copied all as myapp2
and edited build.xml deploy.xml context.xml and
- THE DIFFERENCE is that now I want it as
- So I mkdir /hostappbase/SOMEDIR
- Changed the files that way:

--- build.xml ---
<   <property name=""      value="myapp"/>
<   <property name="app.path"     
>   <property name=""      value="myapp2"/>
>   <property name="app.path"     

<   <property name="build.home"   
>   <property name="build.home"   

--- deploy.xml ---
<   <property name="webapp"   value="myapp"/>
<   <property name="path"     value="/myapp"/>
>   <property name="webapp"   value="myapp2"/>
>   <property name="path"    

<     <jar destfile="/hostappbase/${webapp}.war"
>     <jar

<             path="${path}"
war="/hostappbase/${webapp}.war" update="true" />
>             path="${path}"
war="/hostappbase/SOMEDIR/${webapp}.war" update="true"

--- context.xml ---
<   workDir="work/Catalina/myhost/myapp"
<   path="/myapp"
>   workDir="work/Catalina/myhost/SOMEDIR_myapp2"
>   path="/SOMEDIR/myapp2"

<   docBase="/hostappbase/myapp"
>   docBase="/hostappbase/SOMEDIR/myapp2"

--- web.xml ---
(no changes)

I followed the same steps and the result was:
1- when executed  "ant -f deploy.xml compile" Tomcat
does not realize there is a new .war and does not load
nor unpacks the new app.
2- when executed  "ant -f deploy.xml deploy" it seems
to load the app, but I got this error from Tomcat (so
ant says BUILD FAILED):

ManagerServlet.install[/SOMEDIR/myapp2] no !/ in spec

I found this note:

So I tried this change in deploy.xml:
And I got a FileNotFound error from ant.
I tried combinations but none of them worked.

What is my mistake?
Thanks in advance.

Renovamos el Correo Yahoo!: ¡250 MB GRATIS! 
Nuevos servicios, más seguridad

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

View raw message