Re: context.xml under META-INF was not working

2020-06-11 Thread Mark Thomas
On 11/06/2020 16:09, S Abirami wrote:
> Hi Mark,
> 
> We don't have concern regarding the restart of tomcat for the changes in 
> context.xml. As our web application is mainly used to launch only the 
> standalone application.
> I have updated Cookieprocessor entry under the context tag in server.xml 
> specific to the application context path and it is working fine.

OK.

> But, I could see that tenable detects that all other web application also has 
> the SameSite attribute even though I have mentioned only in the specific 
> application context.
> It is really surprising me . But,  contrast ZAP tool reports for other 
> application it doesn't have SameSite attribute.

Sounds like you need to report a bug to tenable.

Mark


> 
> 
> Regards,
> Abirami.S
> 
> -Original Message-
> From: Mark Thomas  
> Sent: Thursday, June 11, 2020 8:19 PM
> To: Tomcat Users List 
> Subject: RE: context.xml under META-INF was not working
> 
> On June 11, 2020 2:32:51 PM UTC, S Abirami  
> wrote:
>> Hi Mark,
>>
>> We are using Apache Tomcat 9.0.33.
>> I am not seeing any exception regarding it.
> 
> That isn't what I asked. I asked for the log messages .
> 
> Fortunately, you have provided the information I was looking for below.
> 
>> In our application the web-application will not be located under the 
>> CATALINA_HOME/webapps location.
>> We placed in other location and mentioned the path in context tag with 
>> attributes path and docBase in server.xml .
> 
> It is strongly recommended you don't define Context elements in server.xml as 
> they only way to change them us to restart Tomcat.
> 
>> Here ,we mentioned the
>> deployOnStartUp as false.
>> Hence, I have created META-INF directory under the App_folder and 
>> created the context.xml and MANIFEST.MF files.
> 
> That won't work. The Context element in server.xml will be used. Either edit 
> the Context in server.xml or, better, move the Context definitions to 
> $CATALINA_BASE/conf///
> 
> Mark
> 
>>
>> Regarding logs, I could see only the below messages
>>
>> WARNING: Match [Server/Service/Engine/Host/Context] failed to set 
>> property [antiJARLocking] to [false]
>> WARNING: Match [Context/Manager] failed to set property [randomClass] 
>> to [java.security.SecureRandom]
>> SEVERE: Unknown default host [localhost] for service 
>> [StandardService[Catalina]]. Tomcat will not be able process HTTP/1.0 
>> requests that do not specify a host name.
>>
>>
>> Regards,
>> Abirami.S
>>
>> -Original Message-
>> From: Mark Thomas 
>> Sent: Thursday, June 11, 2020 7:27 PM
>> To: users@tomcat.apache.org
>> Subject: Re: context.xml under META-INF was not working
>>
>> On 11/06/2020 12:46, S Abirami wrote:
>>> Hi Mark,
>>>
>>> The below is the content of the context.xml
>>>
>>>   >> sameSiteCookies="strict"/> 
>>
>> That looks OK.
>>
>> What Tomcat version are you using?
>>
>> What do the logs say when the application is deployed? That will tell 
>> you where it is being deployed from which might suggest why that file 
>> isn't taking effect.
>>
>> Mark
>>
>>
>>>
>>> Regards,
>>> Abirami.S
>>> -Original Message-
>>> From: Mark Thomas 
>>> Sent: Thursday, June 11, 2020 5:12 PM
>>> To: users@tomcat.apache.org
>>> Subject: Re: context.xml under META-INF was not working
>>>
>>> On 11/06/2020 11:42, S Abirami wrote:
>>>> Hi All,
>>>>
>>>> I want to configure SameSite attribute to the specific
>> web-application.
>>>> For that, I have updated the context.xml of specific web application
>>
>>>> located in /META-INF/context.xml
>>>>
>>>> 
>>>>
>>>>
>>>> It is not working. Only the changes in global context.xml is
>> working. Please guide to solve the issue.
>>>
>>> What is the full contents of /META-INF/context.xml
>>>
>>> Mark
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>>
>>>
>>> -
>>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>>> For additional commands, e-mail: users-h...@tomcat.apache.org
>>>
>>
>>
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: context.xml under META-INF was not working

2020-06-11 Thread S Abirami
Hi Mark,

We don't have concern regarding the restart of tomcat for the changes in 
context.xml. As our web application is mainly used to launch only the 
standalone application.
I have updated Cookieprocessor entry under the context tag in server.xml 
specific to the application context path and it is working fine.

But, I could see that tenable detects that all other web application also has 
the SameSite attribute even though I have mentioned only in the specific 
application context.
It is really surprising me . But,  contrast ZAP tool reports for other 
application it doesn't have SameSite attribute.


Regards,
Abirami.S

-Original Message-
From: Mark Thomas  
Sent: Thursday, June 11, 2020 8:19 PM
To: Tomcat Users List 
Subject: RE: context.xml under META-INF was not working

On June 11, 2020 2:32:51 PM UTC, S Abirami  
wrote:
>Hi Mark,
>
>We are using Apache Tomcat 9.0.33.
>I am not seeing any exception regarding it.

That isn't what I asked. I asked for the log messages .

Fortunately, you have provided the information I was looking for below.

>In our application the web-application will not be located under the 
>CATALINA_HOME/webapps location.
>We placed in other location and mentioned the path in context tag with 
>attributes path and docBase in server.xml .

It is strongly recommended you don't define Context elements in server.xml as 
they only way to change them us to restart Tomcat.

> Here ,we mentioned the
>deployOnStartUp as false.
>Hence, I have created META-INF directory under the App_folder and 
>created the context.xml and MANIFEST.MF files.

That won't work. The Context element in server.xml will be used. Either edit 
the Context in server.xml or, better, move the Context definitions to 
$CATALINA_BASE/conf///

Mark

>
>Regarding logs, I could see only the below messages
>
>WARNING: Match [Server/Service/Engine/Host/Context] failed to set 
>property [antiJARLocking] to [false]
>WARNING: Match [Context/Manager] failed to set property [randomClass] 
>to [java.security.SecureRandom]
>SEVERE: Unknown default host [localhost] for service 
>[StandardService[Catalina]]. Tomcat will not be able process HTTP/1.0 
>requests that do not specify a host name.
>
>
>Regards,
>Abirami.S
>
>-Original Message-
>From: Mark Thomas 
>Sent: Thursday, June 11, 2020 7:27 PM
>To: users@tomcat.apache.org
>Subject: Re: context.xml under META-INF was not working
>
>On 11/06/2020 12:46, S Abirami wrote:
>> Hi Mark,
>> 
>> The below is the content of the context.xml
>> 
>>   > sameSiteCookies="strict"/> 
>
>That looks OK.
>
>What Tomcat version are you using?
>
>What do the logs say when the application is deployed? That will tell 
>you where it is being deployed from which might suggest why that file 
>isn't taking effect.
>
>Mark
>
>
>> 
>> Regards,
>> Abirami.S
>> -Original Message-
>> From: Mark Thomas 
>> Sent: Thursday, June 11, 2020 5:12 PM
>> To: users@tomcat.apache.org
>> Subject: Re: context.xml under META-INF was not working
>> 
>> On 11/06/2020 11:42, S Abirami wrote:
>>> Hi All,
>>>
>>> I want to configure SameSite attribute to the specific
>web-application.
>>> For that, I have updated the context.xml of specific web application
>
>>> located in /META-INF/context.xml
>>>
>>> 
>>>
>>>
>>> It is not working. Only the changes in global context.xml is
>working. Please guide to solve the issue.
>> 
>> What is the full contents of /META-INF/context.xml
>> 
>> Mark
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>> 
>
>
>-
>To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: context.xml under META-INF was not working

2020-06-11 Thread Mark Thomas
On June 11, 2020 2:32:51 PM UTC, S Abirami  
wrote:
>Hi Mark,
>
>We are using Apache Tomcat 9.0.33.
>I am not seeing any exception regarding it.

That isn't what I asked. I asked for the log messages .

Fortunately, you have provided the information I was looking for below.

>In our application the web-application will not be located under the
>CATALINA_HOME/webapps location.
>We placed in other location and mentioned the path in context tag with
>attributes path and docBase in server.xml .

It is strongly recommended you don't define Context elements in server.xml as 
they only way to change them us to restart Tomcat.

> Here ,we mentioned the
>deployOnStartUp as false.
>Hence, I have created META-INF directory under the App_folder and
>created the context.xml and MANIFEST.MF files.

That won't work. The Context element in server.xml will be used. Either edit 
the Context in server.xml or, better, move the Context definitions to 
$CATALINA_BASE/conf///

Mark

>
>Regarding logs, I could see only the below messages
>
>WARNING: Match [Server/Service/Engine/Host/Context] failed to set
>property [antiJARLocking] to [false]
>WARNING: Match [Context/Manager] failed to set property [randomClass]
>to [java.security.SecureRandom]
>SEVERE: Unknown default host [localhost] for service
>[StandardService[Catalina]]. Tomcat will not be able process HTTP/1.0
>requests that do not specify a host name.
>
>
>Regards,
>Abirami.S
>
>-Original Message-
>From: Mark Thomas  
>Sent: Thursday, June 11, 2020 7:27 PM
>To: users@tomcat.apache.org
>Subject: Re: context.xml under META-INF was not working
>
>On 11/06/2020 12:46, S Abirami wrote:
>> Hi Mark,
>> 
>> The below is the content of the context.xml
>> 
>>   > sameSiteCookies="strict"/> 
>
>That looks OK.
>
>What Tomcat version are you using?
>
>What do the logs say when the application is deployed? That will tell
>you where it is being deployed from which might suggest why that file
>isn't taking effect.
>
>Mark
>
>
>> 
>> Regards,
>> Abirami.S
>> -Original Message-
>> From: Mark Thomas 
>> Sent: Thursday, June 11, 2020 5:12 PM
>> To: users@tomcat.apache.org
>> Subject: Re: context.xml under META-INF was not working
>> 
>> On 11/06/2020 11:42, S Abirami wrote:
>>> Hi All,
>>>
>>> I want to configure SameSite attribute to the specific
>web-application.
>>> For that, I have updated the context.xml of specific web application
>
>>> located in /META-INF/context.xml
>>>
>>> 
>>>
>>>
>>> It is not working. Only the changes in global context.xml is
>working. Please guide to solve the issue.
>> 
>> What is the full contents of /META-INF/context.xml
>> 
>> Mark
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>> 
>> 
>> -
>> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>> For additional commands, e-mail: users-h...@tomcat.apache.org
>> 
>
>
>-
>To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
>For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: context.xml under META-INF was not working

2020-06-11 Thread S Abirami
Hi Mark,

We are using Apache Tomcat 9.0.33.
I am not seeing any exception regarding it.

In our application the web-application will not be located under the 
CATALINA_HOME/webapps location.
We placed in other location and mentioned the path in context tag with 
attributes path and docBase in server.xml .Here ,we mentioned the 
deployOnStartUp as false.
Hence, I have created META-INF directory under the App_folder and created the 
context.xml and MANIFEST.MF files.

Regarding logs, I could see only the below messages

WARNING: Match [Server/Service/Engine/Host/Context] failed to set property 
[antiJARLocking] to [false]
WARNING: Match [Context/Manager] failed to set property [randomClass] to 
[java.security.SecureRandom]
SEVERE: Unknown default host [localhost] for service 
[StandardService[Catalina]]. Tomcat will not be able process HTTP/1.0 requests 
that do not specify a host name.


Regards,
Abirami.S

-Original Message-
From: Mark Thomas  
Sent: Thursday, June 11, 2020 7:27 PM
To: users@tomcat.apache.org
Subject: Re: context.xml under META-INF was not working

On 11/06/2020 12:46, S Abirami wrote:
> Hi Mark,
> 
> The below is the content of the context.xml
> 
>sameSiteCookies="strict"/> 

That looks OK.

What Tomcat version are you using?

What do the logs say when the application is deployed? That will tell you where 
it is being deployed from which might suggest why that file isn't taking effect.

Mark


> 
> Regards,
> Abirami.S
> -Original Message-
> From: Mark Thomas 
> Sent: Thursday, June 11, 2020 5:12 PM
> To: users@tomcat.apache.org
> Subject: Re: context.xml under META-INF was not working
> 
> On 11/06/2020 11:42, S Abirami wrote:
>> Hi All,
>>
>> I want to configure SameSite attribute to the specific web-application.
>> For that, I have updated the context.xml of specific web application 
>> located in /META-INF/context.xml
>>
>> 
>>
>>
>> It is not working. Only the changes in global context.xml is working. Please 
>> guide to solve the issue.
> 
> What is the full contents of /META-INF/context.xml
> 
> Mark
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: context.xml under META-INF was not working

2020-06-11 Thread Mark Thomas
On 11/06/2020 12:46, S Abirami wrote:
> Hi Mark,
> 
> The below is the content of the context.xml
> 
> 
> 
> 
> 

That looks OK.

What Tomcat version are you using?

What do the logs say when the application is deployed? That will tell
you where it is being deployed from which might suggest why that file
isn't taking effect.

Mark


> 
> Regards,
> Abirami.S
> -Original Message-
> From: Mark Thomas  
> Sent: Thursday, June 11, 2020 5:12 PM
> To: users@tomcat.apache.org
> Subject: Re: context.xml under META-INF was not working
> 
> On 11/06/2020 11:42, S Abirami wrote:
>> Hi All,
>>
>> I want to configure SameSite attribute to the specific web-application.
>> For that, I have updated the context.xml of specific web application located 
>> in /META-INF/context.xml
>>
>> 
>>
>>
>> It is not working. Only the changes in global context.xml is working. Please 
>> guide to solve the issue.
> 
> What is the full contents of /META-INF/context.xml
> 
> Mark
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: context.xml under META-INF was not working

2020-06-11 Thread S Abirami
Hi Mark,

The below is the content of the context.xml






Regards,
Abirami.S
-Original Message-
From: Mark Thomas  
Sent: Thursday, June 11, 2020 5:12 PM
To: users@tomcat.apache.org
Subject: Re: context.xml under META-INF was not working

On 11/06/2020 11:42, S Abirami wrote:
> Hi All,
> 
> I want to configure SameSite attribute to the specific web-application.
> For that, I have updated the context.xml of specific web application located 
> in /META-INF/context.xml
> 
> 
> 
> 
> It is not working. Only the changes in global context.xml is working. Please 
> guide to solve the issue.

What is the full contents of /META-INF/context.xml

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: context.xml under META-INF was not working

2020-06-11 Thread Mark Thomas
On 11/06/2020 11:42, S Abirami wrote:
> Hi All,
> 
> I want to configure SameSite attribute to the specific web-application.
> For that, I have updated the context.xml of specific web application located 
> in /META-INF/context.xml
> 
> 
> 
> 
> It is not working. Only the changes in global context.xml is working. Please 
> guide to solve the issue.

What is the full contents of /META-INF/context.xml

Mark

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: context.xml under META-INF was not working

2020-06-11 Thread S Abirami
Hi All,

I want to configure SameSite attribute to the specific web-application.
For that, I have updated the context.xml of specific web application located in 
/META-INF/context.xml




It is not working. Only the changes in global context.xml is working. Please 
guide to solve the issue.

Regards,
Abirami.S


context.xml in META-INF

2013-11-28 Thread Jose María Zaragoza
Hello:

I'm using Tomcat 6.0.23 .
Yes, I know it's an old release

I would like to use

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: context.xml in META-INF

2008-10-09 Thread Ziggy
Please ingnore this. There was a typo in the filename thats why it wasnt
working.

Thanks

On Thu, Oct 9, 2008 at 5:17 PM, Ziggy [EMAIL PROTECTED] wrote:

 Hi all,

 I have the following datasource definition in my /META-INF/context.xml

 Resource name=jdbc/testdb auth=Container
   type=javax.sql.DataSource
 driverClassName=oracle.jdbc.driver.OracleDriver
   url=jdbc:oracle:thin:@10.10.10.10:1521:testdb
   username=testuser password=testuser maxActive=20
 maxIdle=10
   maxWait=-1/

 For some reason the above does not work when i deploy the .war file.
 It does however work if i rename the context.xml file into
 [applicationname].xml and put it into $TOMCAT_HOME/catalina/localhost/

 Does anyone know why it doesnt work if in app/META-INF/context.xml?

 I am using tomcat 5.5

 Thanks



Re: placing context.xml in META-INF works?

2006-10-19 Thread Michael Courcy

Caldarale, Charles R a écrit :
From: Michael Courcy [mailto:[EMAIL PROTECTED] 
Subject: Re: placing context.xml in META-INF works?


How do you manage the problem, if you need to define a Host element 
whith many Alias ?



Hosts are a completely different problem, since they are not subordinate
to an app.

  
Can you put the definition of your Host element in  
%TOMCAT_HOME%/conf/[ENGINE]/[HOST]/myApp.xml, and nest the context 
definition inside the host definition ?



No.  Check the doc for the proper hierarchy of elements.

You can programmatically add hosts on the fly - the admin app does it.

 - Chuck
  

Ok thanks.


RE: placing context.xml in META-INF works?

2006-10-19 Thread Steffen Heil
Hi
 
 2)  User places our clean database file in the recommended 
 location on the server machine. i.e c\databse\ourfile.gdb

A off-topic side note on this:

The c and the backslashes suggest you are using windows.
The gdb extension suggest you are using firebird or interbase.

My recommendation: Change the extension to fdb, as gdb is handled specially
by windows system restore and you might end up having clients whose
computers back up a copy the the database to system restore on any webapp
restart...
Se firebird lists for more details.

Regards,
  Steffen


smime.p7s
Description: S/MIME cryptographic signature


Re: placing context.xml in META-INF works?

2006-10-19 Thread Michael Hencin
Hello, you are correct on both parts. Thanks for the tip, I will make sure to 
fix that.

Also the method I tried worked just fine. My next test is to see if I can 
create diffrent context with the same war, then edit the resulting context.xml 
files to have diffrent db files. this way I can host several of the same apps 
with diffrent db's on our servers for demo purposes.

Mike


- Original Message 
From: Steffen Heil [EMAIL PROTECTED]
To: Tomcat Users List users@tomcat.apache.org
Sent: Thursday, October 19, 2006 5:45:37 AM
Subject: RE: placing context.xml in META-INF works?


Hi

 2)  User places our clean database file in the recommended 
 location on the server machine. i.e c\databse\ourfile.gdb

A off-topic side note on this:

The c and the backslashes suggest you are using windows.
The gdb extension suggest you are using firebird or interbase.

My recommendation: Change the extension to fdb, as gdb is handled specially
by windows system restore and you might end up having clients whose
computers back up a copy the the database to system restore on any webapp
restart...
Se firebird lists for more details.

Regards,
  Steffen

placing context.xml in META-INF works?

2006-10-18 Thread Jason Novotny

Hi,

I have a context.xml file that looks basically like this:

Context path=/portal debug=0 reloadable=false crossContext=true/

In the past using Tomcat 5.5.X I've had to manually copy this file over to

$CATALINA_HOME/conf/Catalina/localhost/ and giving it the filename of 
the context: portal.xml


I was told I could package this in the META-INF directory of my WAR file 
and it would get automatically deployed in Tomcat-- is this correct? I 
tried it but didn't see my context file in the 
$CATALINA_HOME/conf/Catalina/localhost/ directory after starting up...


   Thanks, Jason

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



RE: placing context.xml in META-INF works?

2006-10-18 Thread Caldarale, Charles R
 From: Jason Novotny [mailto:[EMAIL PROTECTED] 
 Subject: placing context.xml in META-INF works?
 
 I have a context.xml file that looks basically like this:
 
 Context path=/portal debug=0 reloadable=false 
 crossContext=true/

Take out the path attribute - it's not allowed unless the Context
element is in server.xml, which is strongly discouraged.

 I was told I could package this in the META-INF directory of 
 my WAR file and it would get automatically deployed in Tomcat
 -- is this correct?

Yes - it must be named context.xml when under META-INF.

 I tried it but didn't see my context file in the 
 $CATALINA_HOME/conf/Catalina/localhost/ directory
 after starting up...

Why do you think you should?  It will only be copied there if the webapp
resides outside of the declared appBase for the Host.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



RE: placing context.xml in META-INF works?

2006-10-18 Thread Michael Hencin
I have a similar need. I have a context file with a JNDI resource, and some
env entries. I want this context file to be copied to the
$CATALINA_HOME/conf/Catalina/localhost/ directory do that the users can use
the default JNDI and env values I enter. 

My app exisits within the appbase and I want this context file to be copied
to the $CATALINA_HOME/conf/Catalina/localhost/ directory when my webapp is
deployed.

Mike

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 18, 2006 1:28 PM
To: Tomcat Users List
Subject: RE: placing context.xml in META-INF works?

 From: Jason Novotny [mailto:[EMAIL PROTECTED] 
 Subject: placing context.xml in META-INF works?
 
 I have a context.xml file that looks basically like this:
 
 Context path=/portal debug=0 reloadable=false 
 crossContext=true/

Take out the path attribute - it's not allowed unless the Context
element is in server.xml, which is strongly discouraged.

 I was told I could package this in the META-INF directory of 
 my WAR file and it would get automatically deployed in Tomcat
 -- is this correct?

Yes - it must be named context.xml when under META-INF.

 I tried it but didn't see my context file in the 
 $CATALINA_HOME/conf/Catalina/localhost/ directory
 after starting up...

Why do you think you should?  It will only be copied there if the webapp
resides outside of the declared appBase for the Host.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



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



RE: placing context.xml in META-INF works?

2006-10-18 Thread Caldarale, Charles R
 From: Michael Hencin [mailto:[EMAIL PROTECTED] 
 Subject: RE: placing context.xml in META-INF works?
 
 I want this context file to be copied to the
 $CATALINA_HOME/conf/Catalina/localhost/ directory do that
 the users can use the default JNDI and env values I enter.

Why does the location of the file containing the Context element have
anything to do with what JNDI references your users have access to?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



RE: placing context.xml in META-INF works?

2006-10-18 Thread Michael Hencin
I want to pre-setup the configuration. I enter all the parameters, for the
JDNCI info, and then the user only needs to install the webapp and if they
use the default database location setting, it would work. 

Resource auth=Container name=octane type=javax.sql.Datasource/
  Resource name=jdbc/octane type=javax.sql.DataSource/
  ResourceParams name=jdbc/octane
parameter
  namemaxWait/name
  value5000/value
/parameter
parameter
  namemaxActive/name
  value20/value
/parameter
parameter
  namepassword/name
  valuepasvallue/value
/parameter
parameter
  nameurl/name
 
valuejdbc:firebirdsql:localhost/3050:c:/Octane/Database/octane.gdb/value
/parameter
parameter
  namedriverClassName/name
  valueorg.firebirdsql.jdbc.FBDriver/value
/parameter
parameter
  namemaxIdle/name
  value12/value
/parameter
parameter
  nameusername/name
  valueSYSDBA/value
/parameter
  /ResourceParams
/Context

So I can have a URL value that expect the database file on the local file
system. Provided the user places our db file there, then they would not need
to modify any other setting in the web app. It would connect.

Mike


-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 18, 2006 2:44 PM
To: Tomcat Users List
Subject: RE: placing context.xml in META-INF works?

 From: Michael Hencin [mailto:[EMAIL PROTECTED] 
 Subject: RE: placing context.xml in META-INF works?
 
 I want this context file to be copied to the
 $CATALINA_HOME/conf/Catalina/localhost/ directory do that
 the users can use the default JNDI and env values I enter.

Why does the location of the file containing the Context element have
anything to do with what JNDI references your users have access to?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



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



RE: placing context.xml in META-INF works?

2006-10-18 Thread Michael Hencin
Also my target users are not tomcat savvy. So the less they need to do, the
better. Having a pre-configured context file get deployed the first time,
makes it easy. They just drop our war file, place the db file on the file
system in the location we specify in the pre-configured context.xml and it
should work out of the gate.

Mike

-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 18, 2006 2:44 PM
To: Tomcat Users List
Subject: RE: placing context.xml in META-INF works?

 From: Michael Hencin [mailto:[EMAIL PROTECTED] 
 Subject: RE: placing context.xml in META-INF works?
 
 I want this context file to be copied to the
 $CATALINA_HOME/conf/Catalina/localhost/ directory do that
 the users can use the default JNDI and env values I enter.

Why does the location of the file containing the Context element have
anything to do with what JNDI references your users have access to?

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



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



RE: placing context.xml in META-INF works?

2006-10-18 Thread Caldarale, Charles R
 From: Michael Hencin [mailto:[EMAIL PROTECTED] 
 Subject: RE: placing context.xml in META-INF works?
 
 Also my target users are not tomcat savvy. So the less they 
 need to do, the better. Having a pre-configured context
 file get deployed the first time, makes it easy. They just
 drop our war file, place the db file on the file system in
 the location we specify in the pre-configured context.xml
 and it should work out of the gate.

Which will work fine without the context.xml being copied anywhere.  I
don't see why you're hung up on having it in the conf/[engine]/[host]
directory - the Context parameters and attributes are still in effect
when the file is in webapps/[appname]/META-INF/context.xml (or .war
equivalent).

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



Re: placing context.xml in META-INF works?

2006-10-18 Thread Michael Courcy



Take out the path attribute - it's not allowed unless the Context
element is in server.xml, which is strongly discouraged.

  

why ?

Mic

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



Re: placing context.xml in META-INF works?

2006-10-18 Thread Christopher Schultz
Michael,

 I want to pre-setup the configuration. I enter all the parameters,
 for the JDNCI info, and then the user only needs to install the
 webapp and if they use the default database location setting, it
 would work.

Isn't this what conf/server.xml is for? I mean, I'm no Tomcat 5.x
expert, but that's what I'd do way back here in Tomcat 4.1.

What's the difference between a webapp template and server-wide
configuration. Same thing, right?

-chris




signature.asc
Description: OpenPGP digital signature


RE: placing context.xml in META-INF works?

2006-10-18 Thread Caldarale, Charles R
 From: Michael Courcy [mailto:[EMAIL PROTECTED] 
 Subject: Re: placing context.xml in META-INF works?
 
  Take out the path attribute - it's not allowed unless the Context
  element is in server.xml, which is strongly discouraged.

 why ?

Because you have to restart Tomcat if you make any changes to server.xml
- it's only read during initialization.  Consequently, updating the app
on the fly when its Context tag is in server.xml is not possible.  To
quote from the doc:

See Automatic Application Deployment for more information. This method
allows dynamic reconfiguration of the web application, since the main
conf/server.xml file cannot be reloaded without restarting Tomcat.
Please note that for tomcat 5, unlike tomcat 4.x, it is NOT recommended
to place Context elements directly in the server.xml file.  Instead,
put them in the META-INF/context.xml directory of your WAR file or the
conf directory as described above.

http://tomcat.apache.org/tomcat-5.5-doc/config/context.html

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



RE: placing context.xml in META-INF works?

2006-10-18 Thread Caldarale, Charles R
 From: Christopher Schultz [mailto:[EMAIL PROTECTED] 
 Subject: Re: placing context.xml in META-INF works?
 
 Isn't this what conf/server.xml is for? I mean, I'm no Tomcat 5.x
 expert, but that's what I'd do way back here in Tomcat 4.1.

Things have changed.  Global resources should be defined in server.xml,
but app-specific ones belong in the Context element for that app.
Specifying them globally makes it much more difficult to modify the
resource attributes without bringing down the whole server.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



Re: placing context.xml in META-INF works?

2006-10-18 Thread Christopher Schultz
Chuck,

 Isn't this what conf/server.xml is for? I mean, I'm no Tomcat 5.x
 expert, but that's what I'd do way back here in Tomcat 4.1.
 
 Things have changed.  Global resources should be defined in server.xml,
 but app-specific ones belong in the Context element for that app.
 Specifying them globally makes it much more difficult to modify the
 resource attributes without bringing down the whole server.

I get that, but it sounds like that's exactly what this guy wants:
configuration that is available to all of his webapps, and never
changes. If it smells like a global resource...?

-chris




signature.asc
Description: OpenPGP digital signature


RE: placing context.xml in META-INF works?

2006-10-18 Thread Caldarale, Charles R
 From: Christopher Schultz [mailto:[EMAIL PROTECTED] 
 Subject: Re: placing context.xml in META-INF works?
 
 I get that, but it sounds like that's exactly what this guy wants:
 configuration that is available to all of his webapps, and never
 changes. If it smells like a global resource...?

I didn't read it that way.  My interpretation was that he wanted
something accesible to all his _customers_ (each with their own server),
not multiple webapps.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



RE: placing context.xml in META-INF works?

2006-10-18 Thread Michael Hencin
Our webapp is given to many discrete clients with their own networks. Often
these users do not have tomcat at all. Our application requires it.
Therefore the IT guy has to install tomcat when they get our web app. And
they are not familiar with the ins and outs of tomcat at all. 

My ideal sequence of events is this.

1)  User installs tomcat
2)  User places our clean database file in the recommended location on the
server machine. i.e c\databse\ourfile.gdb
3) User drops our war file into the webapps directory. It expands, copies
the context.xml file we pre-configure with the db file location from step 2.
4 ) user can then fire up our app. And it connects ok to the db.

I would prefer not to instruct the user to create a global JNDI, or a
context level JNDI using the tomcat/admin app. Not because they can't but to
reduce the number of steps and or sources of user input error. These are our
number one source of installation/deployment hiccups. 

If we can include a preconfigured contxt.xml, and have it used when the app
is deployed, it would then not require the user to setup the context JNDI,
or a global one. Frankly I don't care if its global or context level. I just
want it to work.  



-Original Message-
From: Caldarale, Charles R [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, October 18, 2006 5:49 PM
To: Tomcat Users List
Subject: RE: placing context.xml in META-INF works?

 From: Christopher Schultz [mailto:[EMAIL PROTECTED] 
 Subject: Re: placing context.xml in META-INF works?
 
 I get that, but it sounds like that's exactly what this guy wants:
 configuration that is available to all of his webapps, and never
 changes. If it smells like a global resource...?

I didn't read it that way.  My interpretation was that he wanted
something accesible to all his _customers_ (each with their own server),
not multiple webapps.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



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



Re: placing context.xml in META-INF works?

2006-10-18 Thread Michael Courcy


 


Because you have to restart Tomcat if you make any changes to server.xml
- it's only read during initialization.  Consequently, updating the app
on the fly when its Context tag is in server.xml is not possible.  To
quote from the doc:
  

ok


Actually I'm not pretty sure to be ok.

How do you manage the problem, if you need to define a Host element 
whith many Alias ?
Can you put the definition of your Host element in  
%TOMCAT_HOME%/conf/[ENGINE]/[HOST]/myApp.xml, and nest the context 
definition inside the host definition ?


Mic.

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



RE: placing context.xml in META-INF works?

2006-10-18 Thread Caldarale, Charles R
 From: Michael Hencin [mailto:[EMAIL PROTECTED] 
 Subject: RE: placing context.xml in META-INF works?
 
 My ideal sequence of events is this.
 1) User installs tomcat
 2) User places our clean database file in the recommended 
 location on the server machine. i.e c\databse\ourfile.gdb
 3) User drops our war file into the webapps directory. It 
 expands, copies the context.xml file we pre-configure with
 the db file location from step 2.
 4 ) user can then fire up our app. And it connects ok to the db.

The copy of context.xml in step 3 is not required for proper deployment
- the values in the META-INF/context.xml will still be available to the
application.

 If we can include a preconfigured contxt.xml, and have it 
 used when the app is deployed, it would then not require
 the user to setup the context JNDI, or a global one.

Placing your context.xml in the META-INF directory of your webapp will
allow you to do that - no other steps are required.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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



RE: placing context.xml in META-INF works?

2006-10-18 Thread Caldarale, Charles R
 From: Michael Courcy [mailto:[EMAIL PROTECTED] 
 Subject: Re: placing context.xml in META-INF works?
 
 How do you manage the problem, if you need to define a Host element 
 whith many Alias ?

Hosts are a completely different problem, since they are not subordinate
to an app.

 Can you put the definition of your Host element in  
 %TOMCAT_HOME%/conf/[ENGINE]/[HOST]/myApp.xml, and nest the context 
 definition inside the host definition ?

No.  Check the doc for the proper hierarchy of elements.

You can programmatically add hosts on the fly - the admin app does it.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.

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