This question is the "cousin" of this Android related one . But here we are in the Tomcat environment .
If in my webapp I set a property with System.setProperty("property_name", "property_value"); What area will it be applied to?
System.setProperty("property_name", "property_value");
Many thanks!
The system property has a JVM scope. Thus, the property will be changed (and available) in the entire JVM for all web applications and Tomcat itself.
Please note that the system property is stored in memory and thus is not saved if you stop and restart Tomcat.
In Java, System.setProperty() always applied to the entire JVM.
System.setProperty()
So yes, this will affect the whole instance of Tomcat, including all webapps.