You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Gilles SCHLIENGER <gi...@cncc.fr> on 2018/11/08 20:45:36 UTC
Default context.xml with parallel deployment
Hi everyone,
We are using Tomcat 9.0.8.
We are using xml context files in $CATALINA_BASE/conf/[enginename]/[hostname]/ to store the database connexion information.
When using parallel deployment, I understand that you should use for specific context xml files :
- for myapplication##1.war : myapplication##1.xml
- for myapplication##2.war : myapplication##2.xml
We would like to have a default context xml file ONLY available for the « myapplication » application but for all versions
It seems we could use a file called « context.xml.default » but the properties would be also available to other applications, which we don't want.
Is there a way to have a context.xml file available to all versions of the same application or any other way to do it ?
Thanks a lot in advance !
Regards
Gilles
RE: Default context.xml with parallel deployment
Posted by Gilles SCHLIENGER <gi...@cncc.fr>.
I tried my best with this solution.
Actually, using external entities for an XML attribute is not supported with an external file, so the solution in the FAQ does not seem good.
I get a strange error when I do a SYSTEM reference to an external XML file, the webapp can not start.
I get for my jdbc datasource :
IntrospectionUtils: Assert: Illegal params null ContextResource[name=jdbc/...
So I'm afraid I can't use this solution...
Regards
Gilles
-----Message d'origine-----
De : Gilles SCHLIENGER [mailto:gilles.schlienger@cncc.fr]
Envoyé : vendredi 9 novembre 2018 10:15
À : Tomcat Users List
Objet : RE: Default context.xml with parallel deployment
Thank you very much Mark for your answer.
I will look into the xml entities, I did not know about this feature.
I was wondering if a feature like having a "myapplication.xml.default" could be a good idea to include in future Tomcat releases ?
Thanks again
Regards
Gilles
-----Message d'origine-----
De : Mark Thomas [mailto:markt@apache.org]
Envoyé : jeudi 8 novembre 2018 23:37
À : users@tomcat.apache.org
Objet : Re: Default context.xml with parallel deployment
On 08/11/2018 20:45, Gilles SCHLIENGER wrote:
> Hi everyone,
>
> We are using Tomcat 9.0.8.
>
> We are using xml context files in $CATALINA_BASE/conf/[enginename]/[hostname]/ to store the database connexion information.
>
> When using parallel deployment, I understand that you should use for specific context xml files :
> - for myapplication##1.war : myapplication##1.xml
> - for myapplication##2.war : myapplication##2.xml
>
> We would like to have a default context xml file ONLY available for the « myapplication » application but for all versions
>
> It seems we could use a file called « context.xml.default » but the properties would be also available to other applications, which we don't want.
>
> Is there a way to have a context.xml file available to all versions of the same application or any other way to do it ?
There isn't an explicit Tomcat feature that would do this.
Could you do something with XML entities? There is a description of them
here: https://wiki.apache.org/tomcat/FAQ/Password in the context of
moving passwords to an external file.
Could you create myapplication.txt and then ship each app with a simple
context.xml file that included the above file?
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Default context.xml with parallel deployment
Posted by Gilles SCHLIENGER <gi...@cncc.fr>.
Thank you very much Mark for your answer.
I will look into the xml entities, I did not know about this feature.
I was wondering if a feature like having a "myapplication.xml.default" could be a good idea to include in future Tomcat releases ?
Thanks again
Regards
Gilles
-----Message d'origine-----
De : Mark Thomas [mailto:markt@apache.org]
Envoyé : jeudi 8 novembre 2018 23:37
À : users@tomcat.apache.org
Objet : Re: Default context.xml with parallel deployment
On 08/11/2018 20:45, Gilles SCHLIENGER wrote:
> Hi everyone,
>
> We are using Tomcat 9.0.8.
>
> We are using xml context files in $CATALINA_BASE/conf/[enginename]/[hostname]/ to store the database connexion information.
>
> When using parallel deployment, I understand that you should use for specific context xml files :
> - for myapplication##1.war : myapplication##1.xml
> - for myapplication##2.war : myapplication##2.xml
>
> We would like to have a default context xml file ONLY available for the « myapplication » application but for all versions
>
> It seems we could use a file called « context.xml.default » but the properties would be also available to other applications, which we don't want.
>
> Is there a way to have a context.xml file available to all versions of the same application or any other way to do it ?
There isn't an explicit Tomcat feature that would do this.
Could you do something with XML entities? There is a description of them
here: https://wiki.apache.org/tomcat/FAQ/Password in the context of
moving passwords to an external file.
Could you create myapplication.txt and then ship each app with a simple
context.xml file that included the above file?
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Default context.xml with parallel deployment
Posted by Mark Thomas <ma...@apache.org>.
On 08/11/2018 20:45, Gilles SCHLIENGER wrote:
> Hi everyone,
>
> We are using Tomcat 9.0.8.
>
> We are using xml context files in $CATALINA_BASE/conf/[enginename]/[hostname]/ to store the database connexion information.
>
> When using parallel deployment, I understand that you should use for specific context xml files :
> - for myapplication##1.war : myapplication##1.xml
> - for myapplication##2.war : myapplication##2.xml
>
> We would like to have a default context xml file ONLY available for the « myapplication » application but for all versions
>
> It seems we could use a file called « context.xml.default » but the properties would be also available to other applications, which we don't want.
>
> Is there a way to have a context.xml file available to all versions of the same application or any other way to do it ?
There isn't an explicit Tomcat feature that would do this.
Could you do something with XML entities? There is a description of them
here: https://wiki.apache.org/tomcat/FAQ/Password in the context of
moving passwords to an external file.
Could you create myapplication.txt and then ship each app with a simple
context.xml file that included the above file?
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Default context.xml with parallel deployment
Posted by Gilles SCHLIENGER <gi...@cncc.fr>.
Hi Guido,
Thank you very much for your answer.
Our context xml file contains <Environment> and <Resource> elements
Can you give me more details about what you mean by seamlink ?
We want toovoid having to create a new file in $CATALINA_BASE/conf/[enginename]/[hostname]/ everytime we deploy a war with a new version of the application.
Thanks a lot again
Regards
Gilles
-----Message d'origine-----
De : Jäkel, Guido [mailto:G.Jaekel@dnb.de]
Envoyé : vendredi 9 novembre 2018 08:22
À : 'users@tomcat.apache.org'
Objet : RE: Default context.xml with parallel deployment
Dear Giles,
what aspects do you use in you myapplication#foo.xml ? You may symlink this files from an application-specific master template, e.g. myapplication.xml
greeatings
Guido
>-----Original Message-----
>From: Gilles SCHLIENGER [mailto:gilles.schlienger@cncc.fr]
>Sent: Thursday, November 08, 2018 9:46 PM
>To: users@tomcat.apache.org
>Subject: Default context.xml with parallel deployment
>
>Hi everyone,
>
>We are using Tomcat 9.0.8.
>
>We are using xml context files in $CATALINA_BASE/conf/[enginename]/[hostname]/ to store the database connexion information.
>
>When using parallel deployment, I understand that you should use for specific context xml files :
>- for myapplication##1.war : myapplication##1.xml
>- for myapplication##2.war : myapplication##2.xml
>
>We would like to have a default context xml file ONLY available for the « myapplication » application but for all versions
>
>It seems we could use a file called « context.xml.default » but the properties would be also available to other applications,
>which we don't want.
>
>Is there a way to have a context.xml file available to all versions of the same application or any other way to do it ?
>
>Thanks a lot in advance !
>Regards
>Gilles
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: Default context.xml with parallel deployment
Posted by Jäkel,
Guido <G....@dnb.de>.
Dear Giles,
what aspects do you use in you myapplication#foo.xml ? You may symlink this files from an application-specific master template, e.g. myapplication.xml
greeatings
Guido
>-----Original Message-----
>From: Gilles SCHLIENGER [mailto:gilles.schlienger@cncc.fr]
>Sent: Thursday, November 08, 2018 9:46 PM
>To: users@tomcat.apache.org
>Subject: Default context.xml with parallel deployment
>
>Hi everyone,
>
>We are using Tomcat 9.0.8.
>
>We are using xml context files in $CATALINA_BASE/conf/[enginename]/[hostname]/ to store the database connexion information.
>
>When using parallel deployment, I understand that you should use for specific context xml files :
>- for myapplication##1.war : myapplication##1.xml
>- for myapplication##2.war : myapplication##2.xml
>
>We would like to have a default context xml file ONLY available for the « myapplication » application but for all versions
>
>It seems we could use a file called « context.xml.default » but the properties would be also available to other applications,
>which we don't want.
>
>Is there a way to have a context.xml file available to all versions of the same application or any other way to do it ?
>
>Thanks a lot in advance !
>Regards
>Gilles
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org