Martynas, On 14.04.2021 14:20, Martynas Jusevičius wrote: > you might want to look into containerizing your webapps. We use an > XSLT stylesheet (invoked by the entrypoint script) that transforms env > params into context.xml params: > https://github.com/AtomGraph/LinkedDataHub/blob/master/platform/context.xsl
Thank you very much! If I understood Mark correctly, the environment variable values need to be set in the Tomcat process before Tomcat starts. The aim would be to change the environment for the webapps, i.e. in a running Tomcat instance. A JVM AFAIK would not honor changes to the environment after it got started, but thought it possible that through some magic :) by the Tomcat developers this could be achieved for webapps. The CGI solution works with a new environment as a new (relative expensive) process gets created through Java for which all these aspects could be set. ---rony > On Wed, Apr 14, 2021 at 2:16 PM Rony G. Flatscher (Apache) > <r...@apache.org> wrote: >> On 14.04.2021 13:25, Mark Thomas wrote: >>> On 14/04/2021 12:22, Rony G. Flatscher (Apache) wrote: >>>> Not finding any pointers, asking here: is it possible to define >>>> environment variables for a webapp? >>>> If so, how? >>> You can only set them globally, for the Java process - not per web >>> application. >>> >>> CGI creates a new process so can have a completely different set of >>> environment variables. >>> >>> How about using the per web application JNDI context? >> Well the idea was to adjust PATH to have it point to a webapp based >> directory containing the >> binaries. :) >> >> ---rony >> >> P.S.: The aim would be to make it simple and easy for deploying webapps that >> also need to have >> access to non-Java binaries (executables and/or shared libraries). >> >> >> --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org