You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "Dean A. Hoover" <dh...@rochester.rr.com> on 2003/05/09 15:46:10 UTC
DeployTask deletes mods to server.xml
I am a Tomcat and Ant newbie, attempting to build a jdbc
enabled web app. I am running RH9, jakarta-tomcat-4.1.24,
and apache-ant-1.6alpha. I make changes to server.xml
to support database connects to my database as per the
"Professional Apache Tomcat" (WROX) book. I add a Resource
tagset and a companion ResourceParams tagset, like in
the book. When I run "ant deploy", which hits the DeployTask,
my ResourceParams edits are deleted from the newly created
server.xml. Lucky(?) for me the "old" server.xml file is
saved with a timestamdp. I am constantly forced to put back
my original edits and hand restart tomcat. Any insight into
what is happening here?
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: DeployTask deletes mods to server.xml
Posted by "Dean A. Hoover" <dh...@rochester.rr.com>.
I will try the install task, but the edits are definitely disappearing
from server.xml.
The Resource tagset is uneffected, but the companion ResourceParams,
which is
directly following the Resource tagset, disappears completely. I have
not added
any comments to the file. Any other ideas?
Dean Hoover
Jacob Kjome wrote:
>
> Your edits should be just fine. They are only re-written. All your
> comments would go away, though. You probably want to use the
> "install" task rather than the "deploy" task. The former will leave
> your server.xml alone, although at server restart, your webapp will
> not be persisted. You will have to "install" the app again.
>
> Jake
>
> At 09:46 AM 5/9/2003 -0400, you wrote:
>
>> I am a Tomcat and Ant newbie, attempting to build a jdbc
>> enabled web app. I am running RH9, jakarta-tomcat-4.1.24,
>> and apache-ant-1.6alpha. I make changes to server.xml
>> to support database connects to my database as per the
>> "Professional Apache Tomcat" (WROX) book. I add a Resource
>> tagset and a companion ResourceParams tagset, like in
>> the book. When I run "ant deploy", which hits the DeployTask,
>> my ResourceParams edits are deleted from the newly created
>> server.xml. Lucky(?) for me the "old" server.xml file is
>> saved with a timestamdp. I am constantly forced to put back
>> my original edits and hand restart tomcat. Any insight into
>> what is happening here?
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: DeployTask deletes mods to server.xml
Posted by "Dean A. Hoover" <dh...@rochester.rr.com>.
I tried the "install" task, but it fails. I have it defined exactly the
same way that
I have my deploy task (which works) defined:
<target name="install" description="Install web application"
depends="build">
<install url="${tomcat.url}"
username="${tomcat.username}"
password="${tomcat.password}"
path="${tomcat.path}"
war="file:${tomcat.warfile}"/>
</target>
<target name="deploy" description="Deploy web application"
depends="build">
<deploy url="${tomcat.url}"
username="${tomcat.username}"
password="${tomcat.password}"
path="${tomcat.path}"
war="file:${tomcat.warfile}"/>
</target>
When I look at the log, I see:
2003-05-09 11:01:54 Manager: install: Installing web application at
'/vendor' from 'file:build/vendor.war'
2003-05-09 11:01:54 StandardHost[localhost]: Installing web application
at context path /vendor from URL file:build/vendor.war
2003-05-09 11:01:54 StandardContext[/vendor]: Resources start failed:
java.lang.IllegalArgumentException: Doc base must point to a WAR file
...
Should this be the outcome?
Jacob Kjome wrote:
>
> Your edits should be just fine. They are only re-written. All your
> comments would go away, though. You probably want to use the
> "install" task rather than the "deploy" task. The former will leave
> your server.xml alone, although at server restart, your webapp will
> not be persisted. You will have to "install" the app again.
>
> Jake
>
> At 09:46 AM 5/9/2003 -0400, you wrote:
>
>> I am a Tomcat and Ant newbie, attempting to build a jdbc
>> enabled web app. I am running RH9, jakarta-tomcat-4.1.24,
>> and apache-ant-1.6alpha. I make changes to server.xml
>> to support database connects to my database as per the
>> "Professional Apache Tomcat" (WROX) book. I add a Resource
>> tagset and a companion ResourceParams tagset, like in
>> the book. When I run "ant deploy", which hits the DeployTask,
>> my ResourceParams edits are deleted from the newly created
>> server.xml. Lucky(?) for me the "old" server.xml file is
>> saved with a timestamdp. I am constantly forced to put back
>> my original edits and hand restart tomcat. Any insight into
>> what is happening here?
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: DeployTask deletes mods to server.xml
Posted by Jacob Kjome <ho...@visi.com>.
Your edits should be just fine. They are only re-written. All your
comments would go away, though. You probably want to use the "install"
task rather than the "deploy" task. The former will leave your server.xml
alone, although at server restart, your webapp will not be persisted. You
will have to "install" the app again.
Jake
At 09:46 AM 5/9/2003 -0400, you wrote:
>I am a Tomcat and Ant newbie, attempting to build a jdbc
>enabled web app. I am running RH9, jakarta-tomcat-4.1.24,
>and apache-ant-1.6alpha. I make changes to server.xml
>to support database connects to my database as per the
>"Professional Apache Tomcat" (WROX) book. I add a Resource
>tagset and a companion ResourceParams tagset, like in
>the book. When I run "ant deploy", which hits the DeployTask,
>my ResourceParams edits are deleted from the newly created
>server.xml. Lucky(?) for me the "old" server.xml file is
>saved with a timestamdp. I am constantly forced to put back
>my original edits and hand restart tomcat. Any insight into
>what is happening here?
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: DeployTask deletes mods to server.xml
Posted by david <si...@theworld.com>.
Place it in a META-INF dir under your build home.
There's an example here
http://www.onjava.com/pub/a/onjava/2003/01/08/tomcat4.html?page=3
At 11:44 AM 5/9/2003 -0400, you wrote:
>Where do you put the context.xml file? What does it look like?
>
>david wrote:
>
>>
>>you can place the Resources for the DB in your own app context and use a
>>context.xml file when building with ant --
>>
>>
>>
>>At 09:46 AM 5/9/2003 -0400, Dean A. Hoover wrote:
>>
>>>I am a Tomcat and Ant newbie, attempting to build a jdbc
>>>enabled web app. I am running RH9, jakarta-tomcat-4.1.24,
>>>and apache-ant-1.6alpha. I make changes to server.xml
>>>to support database connects to my database as per the
>>>"Professional Apache Tomcat" (WROX) book. I add a Resource
>>>tagset and a companion ResourceParams tagset, like in
>>>the book. When I run "ant deploy", which hits the DeployTask,
>>>my ResourceParams edits are deleted from the newly created
>>>server.xml. Lucky(?) for me the "old" server.xml file is
>>>saved with a timestamdp. I am constantly forced to put back
>>>my original edits and hand restart tomcat. Any insight into
>>>what is happening here?
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: DeployTask deletes mods to server.xml
Posted by "Dean A. Hoover" <dh...@rochester.rr.com>.
Where do you put the context.xml file? What does it look like?
david wrote:
>
> you can place the Resources for the DB in your own app context and use
> a context.xml file when building with ant --
>
>
>
> At 09:46 AM 5/9/2003 -0400, Dean A. Hoover wrote:
>
>> I am a Tomcat and Ant newbie, attempting to build a jdbc
>> enabled web app. I am running RH9, jakarta-tomcat-4.1.24,
>> and apache-ant-1.6alpha. I make changes to server.xml
>> to support database connects to my database as per the
>> "Professional Apache Tomcat" (WROX) book. I add a Resource
>> tagset and a companion ResourceParams tagset, like in
>> the book. When I run "ant deploy", which hits the DeployTask,
>> my ResourceParams edits are deleted from the newly created
>> server.xml. Lucky(?) for me the "old" server.xml file is
>> saved with a timestamdp. I am constantly forced to put back
>> my original edits and hand restart tomcat. Any insight into
>> what is happening here?
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: DeployTask deletes mods to server.xml
Posted by david <si...@theworld.com>.
you can place the Resources for the DB in your own app context and use a
context.xml file when building with ant --
At 09:46 AM 5/9/2003 -0400, Dean A. Hoover wrote:
>I am a Tomcat and Ant newbie, attempting to build a jdbc
>enabled web app. I am running RH9, jakarta-tomcat-4.1.24,
>and apache-ant-1.6alpha. I make changes to server.xml
>to support database connects to my database as per the
>"Professional Apache Tomcat" (WROX) book. I add a Resource
>tagset and a companion ResourceParams tagset, like in
>the book. When I run "ant deploy", which hits the DeployTask,
>my ResourceParams edits are deleted from the newly created
>server.xml. Lucky(?) for me the "old" server.xml file is
>saved with a timestamdp. I am constantly forced to put back
>my original edits and hand restart tomcat. Any insight into
>what is happening here?
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org