You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by durbans <m3...@yahoo.it> on 2011/01/13 11:26:21 UTC
Context.xml: how to reference parameters inside the same file
I'd like to create a context.xml where I have:
[...]
<Parameter name="name1" value="value1" type="java.lang.String"
override="false"/>
<Parameter name="name2" value="value2" type="java.lang.String"
override="false"/>
<Parameter name="name3" value="value3" type="java.lang.String"
override="false"/>
[...]
<Resource name="jdbc/Test"
parameter1="<NAME1>"
parameter2="<NAME2>"
parameter3="<NAME3>"
>
where parameter1, parameter2 and parameter3 use the values of the parameters
tag defined previously.
Is it possible ?
I didn't find any way or syntax to set name1, name2 and name3 as reference .
It seems that it accepts only strings.
--
View this message in context: http://old.nabble.com/Context.xml%3A-how-to-reference-parameters-inside-the-same-file-tp30660973p30660973.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Context.xml: how to reference parameters inside the same file
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
André,
On 1/13/2011 6:47 AM, André Warnier wrote:
> Konstantin Kolinko wrote:
>> 2011/1/13 durbans <m3...@yahoo.it>:
>>> Is it possible ?
>>>
>>
>> No, not possible.
>>
>> You can reference any system properties, though (as mentioned in [1]).
>> E.g. ${catalina.base} or ${java.io.tmpdir}
>>
>> [1] http://tomcat.apache.org/tomcat-6.0-doc/config/index.html
>>
> Since this is XML, could you not also reference "entities" defined in a
> separate file ?
Or even the same file. :)
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk0vKYsACgkQ9CaO5/Lv0PC/PQCfYfkw9eVor/8pVSFS+ecekn4F
KnYAn2UTzJCIYw38TcrzmBIW9n3z3Yuq
=PHTq
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Context.xml: how to reference parameters inside the same file
Posted by Konstantin Kolinko <kn...@gmail.com>.
> On 1/13/2011 7:27 AM, durbans wrote:
>> awarnier wrote:
>>>
>>> Since this is XML, could you not also reference "entities" defined in a
>>> separate file ?
+1.
>>
>> How ?
>
> http://lmgtfy.com/?q=creating+xml+entities
>
A Tomcat-related example exists here:
http://wiki.apache.org/tomcat/FAQ/Password
It is up to you to read XML spec and adjust it to your needs.
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Context.xml: how to reference parameters inside the same file
Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Durbans,
On 1/13/2011 7:27 AM, durbans wrote:
> awarnier wrote:
>>
>> Since this is XML, could you not also reference "entities" defined in a
>> separate file ?
>
> How ?
http://lmgtfy.com/?q=creating+xml+entities
- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk0vKfUACgkQ9CaO5/Lv0PBtjQCghFknWgiVXvHTIJEhisVrQGwt
380AoJZ+emoo+TNV+aOW1PhOImGdFMYN
=R2FY
-----END PGP SIGNATURE-----
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Context.xml: how to reference parameters inside the same file
Posted by durbans <m3...@yahoo.it>.
awarnier wrote:
>
> Since this is XML, could you not also reference "entities" defined in a
> separate file ?
>
How ?
My problem is that i have a resource:
<resource name="jdbc/name"
attribute1="value1"
attribute2="value2"
attribute3="value3"
>
and I need to get the attributes value in Java code.
I am able to get the <parameter> values (context.getInitParameters()) but
not the <resource> values.
--
View this message in context: http://old.nabble.com/Context.xml%3A-how-to-reference-parameters-inside-the-same-file-tp30660973p30661666.html
Sent from the Tomcat - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Context.xml: how to reference parameters inside the same file
Posted by André Warnier <aw...@ice-sa.com>.
Konstantin Kolinko wrote:
> 2011/1/13 durbans <m3...@yahoo.it>:
>> Is it possible ?
>>
>
> No, not possible.
>
> You can reference any system properties, though (as mentioned in [1]).
> E.g. ${catalina.base} or ${java.io.tmpdir}
>
> [1] http://tomcat.apache.org/tomcat-6.0-doc/config/index.html
>
Since this is XML, could you not also reference "entities" defined in a separate file ?
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: Context.xml: how to reference parameters inside the same file
Posted by Konstantin Kolinko <kn...@gmail.com>.
2011/1/13 durbans <m3...@yahoo.it>:
> Is it possible ?
>
No, not possible.
You can reference any system properties, though (as mentioned in [1]).
E.g. ${catalina.base} or ${java.io.tmpdir}
[1] http://tomcat.apache.org/tomcat-6.0-doc/config/index.html
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org