Re: Defining environment variables for a webapp ?

2021-04-27 Thread Christopher Schultz
different parent based on your operating system, then you might see new values, but most of the spawn/exec calls (regardless of language of implmentation) inherit the exact same environment variables. Some calls do allow you to setup the environment variables for child process but struggling to

Re: Defining environment variables for a webapp ?

2021-04-27 Thread Rony G. Flatscher (Apache)
Niranjan: one correction: On 27.04.2021 15:05, Rony G. Flatscher (Apache) wrote: > ("heyhey.bat" is executed in a subprocess with a new environment such that > its PATH value is > unchanged!). the above statement is wrong, the current environment is inherited with ooRexx' ADDRESS instruction

Re: Defining environment variables for a webapp ?

2021-04-27 Thread Rony G. Flatscher (Apache)
our > operating system, then you > might see new values, but most of the spawn/exec calls (regardless of > language of implmentation) > inherit the exact same environment variables. Some calls do allow you to > setup the environment > variables for child process but strugg

Re: Defining environment variables for a webapp ?

2021-04-26 Thread Niranjan Rao
language of implmentation) inherit the exact same environment variables. Some calls do allow you to setup the environment variables for child process but struggling to figure out where grandparent process informed parent about environment change which can be sent to grandchild. Regards

Re: Defining environment variables for a webapp ?

2021-04-14 Thread Rony G. Flatscher (Apache)
cts could be set. ---rony > On Wed, Apr 14, 2021 at 2:16 PM Rony G. Flatscher (Apache) > 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 de

Re: Defining environment variables for a webapp ?

2021-04-14 Thread Martynas Jusevičius
Rony G. Flatscher (Apache) 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

Re: Defining environment variables for a webapp ?

2021-04-14 Thread Rony G. Flatscher (Apache)
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

Re: Defining environment variables for a webapp ?

2021-04-14 Thread Mark Thomas
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

Defining environment variables for a webapp ?

2021-04-14 Thread Rony G. Flatscher (Apache)
Not finding any pointers, asking here: is it possible to define environment variables for a webapp? If so, how? ---rony P.S.: Tomcat can manipulate the process' environment, e.g. in the case of CGI execution. Here a sample of the process' environment from some CGI-invocation on

Re: Using Environment variables instead of Java -D properties for context.xml substitution

2018-01-23 Thread Christopher Schultz
mmand line are visible to anyone able to get a session on > that host, for the duration of the command. There's no way around > this that I know of. > > Process environment variables may also be visible to all and > sundry, so moving secrets from the command line to the enviro

Re: Using Environment variables instead of Java -D properties for context.xml substitution

2018-01-23 Thread Algirdas Veitas
not just put the db username and password > into your application's META-INF/context.xml file where they belong? > > > One idea, in order to support injecting Environment Variables would > > be to support a syntax of > > > > ${env.DB_USER} > > > > w

Re: Using Environment variables instead of Java -D properties for context.xml substitution

2018-01-23 Thread Christopher Schultz
gt; encrypt the sensitive information. Use sane file permissions? While you are at it, why not just put the db username and password into your application's META-INF/context.xml file where they belong? > One idea, in order to support injecting Environment Variables would > be to su

Re: Using Environment variables instead of Java -D properties for context.xml substitution

2018-01-23 Thread Algirdas Veitas
xyz >>> ./startup.sh >>> >> . once the process has started >> >>> unset DB_USERNAME >>> set -o history >>> >> >> This process does not eliminate the need to store the values of sensitive >> information. But by support

Re: Using Environment variables instead of Java -D properties for context.xml substitution

2018-01-23 Thread Mark H. Wood
und this that I know of. Process environment variables may also be visible to all and sundry, so moving secrets from the command line to the environment just makes slightly more work for the snooper. Removing them from the shell's environment after use may not help, because typically the e

Re: Using Environment variables instead of Java -D properties for context.xml substitution

2018-01-23 Thread tomcat
vailable, in this case a file, versus in the output of "ps -ef | grep java". We can obviously encrypt the sensitive information. One idea, in order to support injecting Environment Variables would be to support a syntax of ${env.DB_USER} where if the subsitution property starts

Re: Using Environment variables instead of Java -D properties for context.xml substitution

2018-01-23 Thread Konstantin Kolinko
t;> >>>> cd $TOMCAT_HOME/bin >>>> set +o history >>>> export DB_USERNAME=xyz >>>> ./startup.sh >>> ..... once the process has started >>>> unset DB_USERNAME >>>> set -o history >>> >>> This process

Re: Using Environment variables instead of Java -D properties for context.xml substitution

2018-01-23 Thread Peter Kreuser
t;> ./startup.sh >> . once the process has started >>> unset DB_USERNAME >>> set -o history >> >> This process does not eliminate the need to store the values of sensitive >> information. But by supporting environment variables, one could eliminate &

Re: Using Environment variables instead of Java -D properties for context.xml substitution

2018-01-23 Thread Peter Kreuser
oes not eliminate the need to store the values of sensitive > information. But by supporting environment variables, one could eliminate > using catalina.properties or -DDB_USERNAME, which exposes the information > on the server. In our case, operations would get the data from a secure >

Re: Using Environment variables instead of Java -D properties for context.xml substitution

2018-01-23 Thread Algirdas Veitas
; set +o history > export DB_USERNAME=xyz > ./startup.sh . once the process has started > unset DB_USERNAME > set -o history This process does not eliminate the need to store the values of sensitive information. But by supporting environment variables, one could eliminate using catalina

Re: Using Environment variables instead of Java -D properties for context.xml substitution

2018-01-23 Thread tomcat
injecting Environment Variables would be to support a syntax of ${env.DB_USER} where if the subsitution property starts with "env", then the variable could be retrieve by System.getEnv(...) otherwise System.getProperty(...). and where does the environment variable value come from ? Is

Re: Using Environment variables instead of Java -D properties for context.xml substitution

2018-01-23 Thread Algirdas Veitas
Thanks for the quick reply George! We could, but the data is still available, in this case a file, versus in the output of "ps -ef | grep java". We can obviously encrypt the sensitive information. One idea, in order to support injecting Environment Variables would be to support a

RE: Using Environment variables instead of Java -D properties for context.xml substitution

2018-01-22 Thread George Stanchev
tomcat-7.0-doc/config/index.html -Original Message- From: Algirdas Veitas [mailto:apvei...@gmail.com] Sent: Monday, January 22, 2018 4:02 PM To: users@tomcat.apache.org Subject: Using Environment variables instead of Java -D properties for context.xml substitution Hi, We have a context

Using Environment variables instead of Java -D properties for context.xml substitution

2018-01-22 Thread Algirdas Veitas
soft/tomcat/apache-tomcat/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -DDB_USERNAME=xyz -DDB_PASSWORD=vvv Which our operations team does not want Is there any syntax that Tomcat can recognize to substitute true environment variables (i.e. export DB_US

Re: Tomcat 8, Log4j, setting environment variables in setenv.sh

2015-02-26 Thread Christopher Schultz
ected in the aforementioned guide), the replacement log manager will auto-detect Log4j. There should be no need to set those environment variables, even in Tomcat 7. - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1 Comment: GPGTools - http://gpgtools.org iQI

Re: Tomcat 8, Log4j, setting environment variables in setenv.sh

2015-02-25 Thread Kyohei Nakamura
How about using an "extras" package If you want to use Log4j for Tomcat logging? http://tomcat.apache.org/tomcat-8.0-doc/logging.html#Using_Log4j 2015-02-26 5:23 GMT+09:00 Owens, Stephen (ITD) : > Hello, > > For tomcat 8 using log4j and apache commons logging, what would be the > correct values t

Tomcat 8, Log4j, setting environment variables in setenv.sh

2015-02-25 Thread Owens, Stephen (ITD)
Hello, For tomcat 8 using log4j and apache commons logging, what would be the correct values to specify in setenv.sh for: LOGGING_MANAGER LOGGING_CONFIG For a tomcat-7.0.26 installation, the values in setenv.sh were: export LOGGING_CONFIG="-Dlog4j.configuration=log4j.properties" export LOGGING_

Re: How to set environment variables for R to use in Tomcat on RedHat Linux (RHEL6)

2013-03-25 Thread Daniel Mikusa
On Mar 24, 2013, at 3:56 AM, Patrick Hong wrote: > I'm trying to set up R and Tomcat on RHEL6 (6.4) > > I have installed R and can run it. I have installed Tomcat 7 and can host > files file. I have packaged an application as a WAR file and deployed it > using tomcat. The application runs fine in

How to set environment variables for R to use in Tomcat on RedHat Linux (RHEL6)

2013-03-24 Thread Patrick Hong
I'm trying to set up R and Tomcat on RHEL6 (6.4) I have installed R and can run it. I have installed Tomcat 7 and can host files file. I have packaged an application as a WAR file and deployed it using tomcat. The application runs fine in all aspects until it uses any R component. This is where i

RE: Getting arbitrary environment variables from webapp

2009-10-01 Thread Mike Baranski
Thanks! >-Original Message- >From: Caldarale, Charles R [mailto:chuck.caldar...@unisys.com] >Sent: Wednesday, September 30, 2009 3:47 PM >To: Tomcat Users List >Subject: RE: Getting arbitrary environment variables from webapp > >> From: Mike Baranski [mailto:list-s

RE: Getting arbitrary environment variables from webapp

2009-09-30 Thread Caldarale, Charles R
> From: Mike Baranski [mailto:list-subscripti...@secmgmt.com] > Subject: Getting arbitrary environment variables from webapp > > Is there a way I can specify an environment variable via > the startup.sh Create a setenv.sh script in Tomcat's bin directory and export whatever

Getting arbitrary environment variables from webapp

2009-09-30 Thread Mike Baranski
Is there a way I can specify an environment variable via the startup.sh that I can then use System.getenv("MYWEBAPP_CONFIG_FILE"); to get it from within my application? I need to store a file outside of the webroot to read configuration from, so that if a user changes this file, it will not get o

RE: environment variables for hostname and context name

2009-09-19 Thread Caldarale, Charles R
> From: Chris Cheshire [mailto:cheshira...@gmail.com] > Subject: Re: environment variables for hostname and context name > > The tomcat directory is available through the environment > somehow, and is accessed as ${catalina.home}. The ${catalina.home} reference is to a system p

Re: environment variables for hostname and context name

2009-09-18 Thread Chris Cheshire
Right. The tomcat directory is available through the environment somehow, and is accessed as ${catalina.home}. From here I can get to the tomcat logs directory. What else is exposed this way? I am hoping that if the host and context are available in the logging message itself, then maybe they are/c

Re: environment variables for hostname and context name

2009-09-18 Thread Rainer Jung
On 19.09.2009 02:18, Chris Cheshire wrote: > I'm reconfiguring the logging for my tomcat installation (6.0.20) to > use logback (instead of log4j) for the server logging so I can split > out error messages on a per host basis. I see that "catalina.home" is > exposed as an environment var and usable

Re: environment variables for hostname and context name

2009-09-18 Thread Chris Cheshire
I forced that error specifically for this example. That's not the issue. That is an example of what I am trying to log, and it illustrates that the information I need is available at the logging level. On Fri, Sep 18, 2009 at 7:01 PM, Martin Gainty wrote: > > org.apache.jasper.JasperException: /

RE: environment variables for hostname and context name

2009-09-18 Thread Martin Gainty
ire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Fri, 18 Sep 2009 17:18:08 -0700 > Subject: environment variables for hostname and context name > From: cheshira...@gmail.com &g

environment variables for hostname and context name

2009-09-18 Thread Chris Cheshire
I'm reconfiguring the logging for my tomcat installation (6.0.20) to use logback (instead of log4j) for the server logging so I can split out error messages on a per host basis. I see that "catalina.home" is exposed as an environment var and usable in the logging configuration file - what about the

Re: Configuring different environment variables for different vhost context?

2009-09-03 Thread Markus Fischer
Hi, Caldarale, Charles R wrote: > I think the code snippet you posted should be working with the > element you posted previously. Might be time to add some print statements to > find out what the Hudson code gets back from the Context.lookup() calls. Thanks, your message made me confident tha

RE: Configuring different environment variables for different vhost context?

2009-09-03 Thread Caldarale, Charles R
> From: Markus Fischer [mailto:mar...@fischer.name] > Subject: Re: Configuring different environment variables for different > vhost context? > > Matching that with your comment about JNDI, I see a partial match here > :) However I lack the knowledge to understand what the c

Re: Configuring different environment variables for different vhost context?

2009-09-03 Thread Markus Fischer
Hi, Caldarale, Charles R wrote: > I think you're confusing environment variables with environment entries - > they are completely different things. Environment variables have a scope of > process, and are accessed in Java via System.getenv(). Environment entries > (what yo

RE: Configuring different environment variables for different vhost context?

2009-09-03 Thread Caldarale, Charles R
> From: Markus Fischer [mailto:mar...@fischer.name] > Subject: Configuring different environment variables for different > vhost context? > > in tomcat55/Catalina/hudson-test.dev/ROOT.xml I have > > value="/data/java/hudson-test"/> > I think you&#x

Configuring different environment variables for different vhost context?

2009-09-03 Thread Markus Fischer
Hi, I want to deploy multiple version of an application (Hudson [1] in my case). Each running instance needs the environment variable HUDSON_HOME point to a different location. However I only manage to either specify either a HUDSON_HOME for all instances or none at all :-( In tomcat55/server.xml

RE: Environment Variables

2008-06-06 Thread Caldarale, Charles R
> From: David Delbecq [mailto:[EMAIL PROTECTED] > Subject: Re: Environment Variables > > Tomcat does not use CLASSPATH. The list of variables used by tomcat is > written at the top of catalina.sh script. Note that the Tomcat code does not use *any* environment variables - only

RE: Environment Variables

2008-06-06 Thread paul.ockleford
Brilliant thanks for that. -Original Message- From: David Delbecq [mailto:[EMAIL PROTECTED] Sent: 06 June 2008 07:49 To: Tomcat Users List Subject: Re: Environment Variables Tomcat does not use CLASSPATH. The list of variables used by tomcat is written at the top of catalina.sh script

Re: Environment Variables

2008-06-06 Thread David Delbecq
Tomcat does not use CLASSPATH. The list of variables used by tomcat is written at the top of catalina.sh script. En l'instant précis du 06/06/08 10:46, [EMAIL PROTECTED] s'exprimait en ces termes: Hi, Can anybody tell me which environment variables tomcat uses? I am pretty su

Environment Variables

2008-06-06 Thread paul.ockleford
Hi, Can anybody tell me which environment variables tomcat uses? I am pretty sure it uses JAVA_HOME for core java, and I am guessing it uses the web application directories for classes belonging to web apps under it. The reason I am asking this is that I have a jar file clash on my development

Re: Unable to read shell environment variables

2008-03-28 Thread Mark Thomas
Patrick Lee wrote: Does anyone know if this has been fixed in a newer 6 release or if someone is already looking at it? I have just fixed trunk and proposed this fix for 6.0.x. http://svn.apache.org/viewvc?rev=642391&view=rev A fix has also been proposed for 5.5.x http://people.apache.org/~mar

RE: Unable to read shell environment variables

2008-03-26 Thread Caldarale, Charles R
> From: Patrick Lee [mailto:[EMAIL PROTECTED] > Subject: Re: Unable to read shell environment variables > > In the code for CGIServelet.java there is no check for "windows vista" As a workaround until this gets fixed, you can override the os.name property on the command li

Re: Unable to read shell environment variables

2008-03-26 Thread Patrick Lee
On Fri, Feb 29, 2008 at 2:23 PM, Caldarale, Charles R <[EMAIL PROTECTED]> wrote: > When running a Java program under Win2008, what value does the system > property os.name have? windows vista > What JVM version are you running? (This has the potential of being a > JVM, not Tomcat, problem.

RE: Unable to read shell environment variables

2008-02-28 Thread Caldarale, Charles R
> From: Patrick Lee [mailto:[EMAIL PROTECTED] > Subject: Unable to read shell environment variables > > It looks like getShellEnvironment() is testing for specific versions > of Windows and 2008 is not one of them, then defaulting to the unix > call and throwing the "

Unable to read shell environment variables

2008-02-28 Thread Patrick Lee
Hi, I'm getting this error when trying to use CGI under tomcat on Windows Server 2008": javax.servlet.ServletException: Unable to read shell environment variables This line also displays: Cannot run program "env": CreateProcess error=2, It looks like getShellEnvironm

Re: Environment variables

2007-11-06 Thread Gabe Wong
Andrew Hole wrote: I'm trying to execute a ssh command inside java code. SSH command must know HOMEDRIVE environment variable to find know_hosts file... How can I do that? Hi Andrew, You can pass the value as a Java Option. Click the Tomcat Service Manager icon (usually lower right of the W

Re: Environment variables

2007-11-06 Thread Andrew Hole
> know HOMEDRIVE environment variable to find know_hosts file... How can > > I do that? > > How are you invoking ssh? If you're doing a standard Runtime.exec, why > not just use the versions of that method which take environment > variables as parameters? > > - -ch

Re: Environment variables

2007-11-06 Thread Christopher Schultz
re doing a standard Runtime.exec, why not just use the versions of that method which take environment variables as parameters? - -chris -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHMIcT9CaO5/Lv0PARAmbgAJwLJiMu33Cs8qdsB

Re: Environment variables

2007-11-06 Thread Andrew Hole
:[EMAIL PROTECTED] > > Subject: Environment variables > > > > how can I setup environment variables on tomcat windows service? > > Tomcat cleans environment variables... > > You can't - services don't use environment variables. Use the > tomcat?w.exe program to

RE: Environment variables

2007-11-06 Thread Caldarale, Charles R
> From: Andrew Hole [mailto:[EMAIL PROTECTED] > Subject: Environment variables > > how can I setup environment variables on tomcat windows service? > Tomcat cleans environment variables... You can't - services don't use environment variables. Use the tomcat?w.exe p

Environment variables

2007-11-06 Thread Andrew Hole
Hello! how can I setup environment variables on tomcat windows service? Tomcat cleans environment variables... Thanks a lot - To start a new topic, e-mail: users@tomcat.apache.org To unsubscribe, e-mail: [EMAIL PROTECTED] For

Re: Tomcat 55 on Linux Debian + environment variables

2007-04-12 Thread Faillot
Hi, > > I have a Java servlet running with Tomcat 5.5 under Linux Debian. This > servlet calls other processes. I need to specify environment variables > to indicate where are located these processes. > Is it possible to specify environment variables but only available for >

Re: CGI environment variables

2007-02-10 Thread Mark Thomas
Patrick Lee wrote: > Hi, > > I have an issue with CGI scripts (Perl based) running under Tomcat on > Windows 2000 getting URL's wrong by using backslashes instead of forward > slashes. > > Does anyone know how to fix this? It is a bug. I have fixed it in svn and it will be in the next 5.5.x and

CGI environment variables

2007-02-08 Thread Patrick Lee
or set the systemroot env var at the top of any Perl scripts in order to be able to open a TCP/IPsocket. Otherwise I get a Can't create TCP/IP socket (10106) error. 3. As such, I have passShellEnvironment to true. 4. If I list the environment variables in Perl - for SCRIPT_NAME I get a leadin

RE: Tomcat 5.5.20: issue with tomcat service & defining application specific environment variables

2007-01-19 Thread Caldarale, Charles R
> From: Sampath Kumar Rallapalli [mailto:[EMAIL PROTECTED] > Subject: RE: Tomcat 5.5.20: issue with tomcat service & > defining application specific environment variables > > I set the environment variable, -Djava.library.path This is _not_ an environment variable -

RE: Tomcat 5.5.20: issue with tomcat service & defining application specific environment variables

2007-01-19 Thread Sampath Kumar Rallapalli
omcat 5.5.20: issue with tomcat service & > defining application specific environment variables > > > From: Sampath Kumar Rallapalli [mailto:[EMAIL PROTECTED] > > Subject: RE: Tomcat 5.5.20: issue with tomcat service & > > defining application specific environment

Re: Tomcat 5.5.20: issue with tomcat service & defining application specific environment variables

2007-01-17 Thread Martin Gainty
ribuer ou de le reproduire. - Original Message - From: "Sampath Kumar Rallapalli" <[EMAIL PROTECTED]> To: "Tomcat Users List" Sent: Wednesday, January 17, 2007 2:58 PM Subject: RE: Tomcat 5.5.20: issue with tomcat service & defining application specific en

RE: Tomcat 5.5.20: issue with tomcat service & defining application specific environment variables

2007-01-17 Thread Caldarale, Charles R
> From: Caldarale, Charles R > Subject: RE: Tomcat 5.5.20: issue with tomcat service & > defining application specific environment variables > > > From: Sampath Kumar Rallapalli [mailto:[EMAIL PROTECTED] > > Subject: RE: Tomcat 5.5.20: issue with tomcat service

RE: Tomcat 5.5.20: issue with tomcat service & defining application specific environment variables

2007-01-17 Thread Caldarale, Charles R
> From: Sampath Kumar Rallapalli [mailto:[EMAIL PROTECTED] > Subject: RE: Tomcat 5.5.20: issue with tomcat service & > defining application specific environment variables > > Thanks Chuck for your response. I tried your suggestion of > providing an additional ar

RE: Tomcat 5.5.20: issue with tomcat service & defining application specific environment variables

2007-01-17 Thread Sampath Kumar Rallapalli
From: Sampath Kumar Rallapalli [mailto:[EMAIL PROTECTED] > Subject: Tomcat 5.5.20: issue with tomcat service & defining > application specific environment variables > > But the path to this dll is defined in the SYSTEM variables > in the SYSTEM PATH variable. Not sure

RE: Tomcat 5.5.20: issue with tomcat service & defining application specific environment variables

2007-01-17 Thread Caldarale, Charles R
> From: Sampath Kumar Rallapalli [mailto:[EMAIL PROTECTED] > Subject: Tomcat 5.5.20: issue with tomcat service & defining > application specific environment variables > > But the path to this dll is defined in the SYSTEM variables > in the SYSTEM PATH variable. Not

Tomcat 5.5.20: issue with tomcat service & defining application specific environment variables

2007-01-17 Thread Sampath Kumar Rallapalli
de, how to provide the application specific environment variables? I tried creating the file setenv.bat inside \bin directory and stopped and restarted the service. But, tomcat service has not picked them up. (If we run tomcat in non-service mode, we can define the application specific s