[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tomcat-user
Subject:    Re: Need information
From:       Christopher Schultz <chris () christopherschultz ! net>
Date:       2018-07-24 16:47:24
Message-ID: 54089657-69f1-7181-0902-7003a4a7fcc3 () christopherschultz ! net
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Francesco,

On 7/24/18 12:39 PM, Francesco Viscomi wrote:
> Ok thanks, i need to know for Tomcat 7

You want "context aliases":

https://tomcat.apache.org/tomcat-7.0-doc/config/context.html#Standard_Im
plementation

Search for the "aliases" attribute.

> And Tomcat 8.5

You want "post-load resources":

https://tomcat.apache.org/tomcat-8.5-doc/config/resources.html

Search for "PostResources".

Resources are available in both pre-resource and post-resource forms.
I recommend using post-resource so that a stray file in the target
location can't mask a file provided by the application.

On the other hand, if the application contains a "default config file"
and you want to override it with an environment-specific replacement,
then you'll want to use pre-resources instead of post-resources.

Note that "resources" are used to load EVERYTHING, including class
files, etc. You should read and re-read the entire section on
Resources in the user-guide until you understand the implications of
the configuration you are about to implement.

- -chris

> Il mar 24 lug 2018, 18:20 Christopher Schultz
> <chris@christopherschultz.net> ha scritto:
> 
> Francesco,
> 
> On 7/24/18 2:26 AM, Francesco Viscomi wrote:
>>>> Ok thanks, anyway is there a way to add a resource to the
>>>> tomcat classpath, i know that it is possibile because in my
>>>> previous job i 've used that :)
> 
> Yes, this is possible, but the answer depends upon your Tomcat
> version.
> 
> Please tell us your tomcat version.
> 
> -chris
> 
>>>> Il mar 24 lug 2018, 00:00 M. Manna <manmedia@gmail.com> ha 
>>>> scritto:
>>>> 
>>>>> This is not relevant to tomcat. you have to read how to
>>>>> configure spring application environment variables and
>>>>> classpath. Below are some examples, which you can read and
>>>>> configure yourself.
>>>>> 
>>>>> 
>>>>> https://docs.spring.io/spring-boot/docs/current/reference/html/boo
t-f
>
>>>>> 
eatures-external-config.html
> <https://docs.spring.io/spring-boot/docs/current/reference/html/boot-f
eatures-external-config.html>
>>>>>
>>>>>
>>>>>
>
> 
https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#bo
> ot-features-external-config-application-property-files 
> <https://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/
#boot-features-external-config-application-property-files>
>>>>>
>>>>>
> 
https://stackoverflow.com/questions/41461786/how-to-externalize-appli
> cation-properties-in-tomcat-webserver-for-spring 
> <https://stackoverflow.com/questions/41461786/how-to-externalize-appli
cation-properties-in-tomcat-webserver-for-spring>
>>>>>
>>>>>
>>>>>
>
> 
Thanks,
>>>>> 
>>>>> On Mon, 23 Jul 2018, 21:58 Francesco Viscomi, 
>>>>> <fviscomi@gmail.com> wrote:
>>>>> 
>>>>>> Because I need to add a folder (properties) under the
>>>>>> tomcat installation in order to read the properties in a
>>>>>> file with the following annotation (using spring) 
>>>>>> @PropertySource("classpath:properties/application.properties");
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>
>>>>>> 
2018-07-23 22:21 GMT+02:00 M. Manna <manmedia@gmail.com>:
>>>>>> 
>>>>>>> You should never modify them, unless you know precisely
>>>>>>> what you're
>>>>> doing
>>>>>>> it, and why.
>>>>>>> 
>>>>>>> What ia your reason to modify them? What would you like
>>>>>>> to do?
>>>>>>> 
>>>>>>> On Mon, 23 Jul 2018, 20:30 Francesco Viscomi, 
>>>>>>> <fviscomi@gmail.com>
>>>>>> wrote:
>>>>>>> 
>>>>>>>> Sir Manna you're right, but at the moment I cannot
>>>>>>>> go through debug; So if there is an explanation and
>>>>>>>> why i should modify them, it will
>>>>> be
>>>>>>> very
>>>>>>>> important to me.
>>>>>>>> 
>>>>>>>> thanks
>>>>>>>> 
>>>>>>>> 2018-07-23 18:06 GMT+02:00 M. Manna
>>>>>>>> <manmedia@gmail.com>:
>>>>>>>> 
>>>>>>>>> http://tomcat.apache.org/tomcat-8.5-doc/class-loader-
>>>>>>>>>
>>>>>>>>> 
howto.html#Class_Loader_Definitions
>>>>>>>>> 
>>>>>>>>> Also, you should try and pay attention to
>>>>>>>>> Bootstrap.java file and
>>>>>> debug
>>>>>>>>> through the execution to understand how it's
>>>>>>>>> working.
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> On 23 July 2018 at 17:03, Francesco Viscomi 
>>>>>>>>> <fviscomi@gmail.com>
>>>>>>> wrote:
>>>>>>>>> 
>>>>>>>>>> hi all In catalina.properties i find :
>>>>>>>>>> common.loaders serverr.loaders shared.loaders
>>>>>>>>>> 
>>>>>>>>>> And i wasn t able to find out the meaning of
>>>>>>>>>> that variables, some
>>>>>> one
>>>>>>>> can
>>>>>>>>>> tell to me and if possibile also a link to the 
>>>>>>>>>> documentation in
>>>>>> wich
>>>>>>>>> these
>>>>>>>>>> variable are treated
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> Thanks
>>>>>>>>>> 
>>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> 
>>>>>>>> -- Ing. Viscomi Francesco
>>>>>>>> 
>>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> 
>>>>>> -- Ing. Viscomi Francesco
>>>>>> 
>>>>> 
>>>> 
>> 
>> ---------------------------------------------------------------------
>>
>> 
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
>> For additional commands, e-mail: users-help@tomcat.apache.org
>> 
>> 
> 
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIzBAEBCAAdFiEEMmKgYcQvxMe7tcJcHPApP6U8pFgFAltXWBwACgkQHPApP6U8
pFh5DRAAsDwAsOmSh+oYx/kmbk3UwNDBRLx+Xb0tq+N6Hkxre4xXatnNIL3IdFxK
nfTHo2PnIP6nYomDnUnGaYBKqhA/lsvZ5Qu4vH9ZYBFDw8isPQZYDdGwPy5NQkgD
f91orE0U7V634HCK3fNNwqsyCcv93zNtEjUU2JQpaQ2+LikqV5WaiV8Nr9uSaYun
CSYP7+Enb0JECYuaYSycUfZeUZ/LiYWridFZaj1sfB/NaVX+vMRV7beHZrsK8IMl
dZfZs3AFkgvB5CLekszBblAjF0HfZUICmu+8Y5AYyjSc+9UJHQm303eED23RBVVZ
H3w9T0Fbx99cwI4tpFjJo1G0ytw4APH0SL3FiGfWmLRTz7mwBBpEWlZZZqaq+fiH
Yes6NkR2s4CxCuAiDl+HUgSf3cdUC2VqH/Ycj//Q2Tzo2RJwnq00T3Sk9WfZiPFm
9BLw50zRvLnZ0bMEsIxLvzpcy2u3SoJDKKWQ4pXC0iS7QTCrG+EYy+iSycMvTvkL
jhGl+QdkxMk/YR5YUWqe4NjC0rA/Y2rkK+lbb8j83Z4XfSh110LnNNKNEAslPA4T
VHCRY65JqxsqPMhB8r+23QYdjIaSn417sOwzYP5cihqt66wt9Rs2HWJBZq6JlfxR
mWw9Fg6AtJ1pNoI75HgzukgN5nAq36Tn1Vc0GgU3yAc4QGqQtuk=
=ZAIz
-----END PGP SIGNATURE-----

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

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic