You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Tim Shaw <ti...@everserve.co.uk> on 2003/05/19 20:32:24 UTC

Install/Deploy question

Hi,

Every time I deploy a webapp (using Ant and/or manager/deploy to e
remote server), the Context entry in server.xml is rebuilt based on
what's in the web.xml. I am trying to make a jdbc resource available to
just this webapp, so the Context entry seems like a sensible place to
put it - but I can't get the Resource and ResourceParams to stay put!

I have managed to do what I want by creating a Context entry in an xml
file, copying this and the .war to my server and then doing an Install.

I have tried a few other options (below), but nothing seems to be
'suitable'.

Is there any way to get 'deploy' to take both a config and a war - thus
working as the install but without the intermediate step of copying the
files - or is there another approach I have missed?

Many thanks

tim

Alternatives :
DefaultContext - adds the same entries to all the autodeployed wars! Not
good for hiding things.
GlobalNamingResources - can't get web.xml to generate ResourceLink entry
(rather than Resource)


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Re: Install/Deploy question

Posted by Tim Shaw <ti...@everserve.co.uk>.
Perfect, many thanks. One for the FAQ I think (I couldn't find it).

Regards

tim

Jacob Kjome wrote:
> 
> Copy your context configuration file into the META-INF (no, I don't mean 
> WEB-INF) of the .war file.  Name the file "context.xml".  Now use the 
> deploy task.  Everything should be peachy.
> 
> Jake
> 
> At 07:32 PM 5/19/2003 +0100, you wrote:
> 
>> Hi,
>>
>> Every time I deploy a webapp (using Ant and/or manager/deploy to e
>> remote server), the Context entry in server.xml is rebuilt based on
>> what's in the web.xml. I am trying to make a jdbc resource available to
>> just this webapp, so the Context entry seems like a sensible place to
>> put it - but I can't get the Resource and ResourceParams to stay put!
>>
>> I have managed to do what I want by creating a Context entry in an xml
>> file, copying this and the .war to my server and then doing an Install.
>>
>> I have tried a few other options (below), but nothing seems to be
>> 'suitable'.
>>
>> Is there any way to get 'deploy' to take both a config and a war - thus
>> working as the install but without the intermediate step of copying the
>> files - or is there another approach I have missed?
>>
>> Many thanks
>>
>> tim
>>
>> Alternatives :
>> DefaultContext - adds the same entries to all the autodeployed wars! Not
>> good for hiding things.
>> GlobalNamingResources - can't get web.xml to generate ResourceLink entry
>> (rather than Resource)
>>
>>
>> ---------------------------------------------------------------------
>> 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: Install/Deploy question

Posted by Jacob Kjome <ho...@visi.com>.
Copy your context configuration file into the META-INF (no, I don't mean 
WEB-INF) of the .war file.  Name the file "context.xml".  Now use the 
deploy task.  Everything should be peachy.

Jake

At 07:32 PM 5/19/2003 +0100, you wrote:
>Hi,
>
>Every time I deploy a webapp (using Ant and/or manager/deploy to e
>remote server), the Context entry in server.xml is rebuilt based on
>what's in the web.xml. I am trying to make a jdbc resource available to
>just this webapp, so the Context entry seems like a sensible place to
>put it - but I can't get the Resource and ResourceParams to stay put!
>
>I have managed to do what I want by creating a Context entry in an xml
>file, copying this and the .war to my server and then doing an Install.
>
>I have tried a few other options (below), but nothing seems to be
>'suitable'.
>
>Is there any way to get 'deploy' to take both a config and a war - thus
>working as the install but without the intermediate step of copying the
>files - or is there another approach I have missed?
>
>Many thanks
>
>tim
>
>Alternatives :
>DefaultContext - adds the same entries to all the autodeployed wars! Not
>good for hiding things.
>GlobalNamingResources - can't get web.xml to generate ResourceLink entry
>(rather than Resource)
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org