How to set new Tomcat Environment variable?

I have an imported class used by my servlet that is supposed to look for an environment variable like "xxx.app.logdir". I'm having trouble setting it in Tomcat. I have tried the following (stopping and starting Tomcat with each change):
1) In \conf\server.xml file, adding under <GlobalNamingResources> <Environment name="simpleValue" type="java.lang.Integer" value="30"/>
<Environment name="xxx.app.logdir" type="java.lang.String" value="C:\\Tomcat-4-1\\logs"/>2) In my app's web.xml file <env-entry>
  <env-entry-name>xxx.app.logdir</env-entry-name>
  <env-entry-value>C:\\Tomcat-4-1\\logs</env-entry-value>
  <env-entry-type>java.lang.String</env-entry-type>
</env-entry> 3) In my \bin\startup.bat file
set xxx.app.logdir=C:\\Tomcat-4-1\\
4) On my PC's Environment variables.
Nothing has worked. In my code I have the lines
logMsg("System.getProperty('mmm.app.logdir')=" +
System.getProperty("xxx.app.logdir"));
logMsg("System.getProperty('simpleValue')=" +
System.getProperty("simpleValue")); with the output :System.getProperty('xxx.app.logdir')=null
System.getProperty('simpleValue')=null I've searched forums and the Tomcat docs, but no luck. Any ideas?

I tried that as well, but maybe I didn't define my DefaultContect correctly. Do I need any other parameters? Couldn't find it in the Tomcat docs. <DefaultContext>
<Environment name="matt" type="java.lang.String" value="value1" />
</DefaultContext>My new code (I simplified the variable name for testing):
System.out.println("System.getProperty('matt')=" + System.getProperty("matt"));
System.out.println("System.getProperty('MATT')=" + System.getProperty("MATT"));Results:
System.getProperty('matt')=null
System.getProperty('MATT')=null

Similar Messages

  • How to set the PATH Environment variable with multiple homes?

    I have several Oracle homes, and now I cannot get reports to work anymore. These are the things I installed, in this order:
    - Oracle Database 10g
    - Oracle Developer Suite 10g
    - Oracle Discoverer 4
    - Oracle HTMLDB
    Now my PATH environment variable is flooded with paths, but none seem to work when I want to start Reports 10g. I deleted all of the paths from the other homes and still no luck.
    This was my original PATH:
    C:\oracle\product\10.1.0\db_1\jre\1.4.2\bin\client;
    C:\oracle\product\10.1.0\db_1\jre\1.4.2\bin;
    C:\oradev10g\jdk\jre\bin\classic;
    C:\oradev10g\jdk\jre\bin;
    C:\oracle\product\10.1.0\compdb_1\jre\1.4.2\bin;
    C:\oracle\product\10.1.0\compdb_1\bin;
    C:\oracle\product\10.1.0\compdb_1\jre\1.1.8\bin;
    C:\oracle\product\10.1.0\compdb_1\jre\1.4.2\bin\client;
    C:\Disco41Home\bin;C:\oracle\product\10.1.0\db_1\bin;
    C:\oradev10g\jdk\jre\bin\client;C:\oradev10g\jlib;
    C:\oradev10g\bin;
    C:\oradev10g\jre\1.4.1\bin;
    C:\oradev10g\jre\1.1.8\bin;
    C:\PROGRAM FILES\THINKPAD\UTILITIES;
    %SystemRoot%\system32;
    %SystemRoot%;
    %SystemRoot%\System32\Wbem;
    C:\WINDOWS\Downloaded Program Files;
    %SystemDrive%\IBMTOOLS\Python22;
    C:\Program Files\PC-Doctor for Windows\services
    and this is the PATH after I stripped it:
    C:\oradev10g\jdk\jre\bin\classic;
    C:\oradev10g\jdk\jre\bin;
    C:\oradev10g\jdk\jre\bin\client;
    C:\oradev10g\jre\1.1.8\bin;
    C:\oradev10g\jlib;
    C:\oradev10g\bin;
    C:\PROGRAM FILES\THINKPAD\UTILITIES;
    %SystemRoot%\system32;
    %SystemRoot%;%SystemRoot%\System32\Wbem;
    C:\WINDOWS\Downloaded Program Files;
    %SystemDrive%\IBMTOOLS\Python22;
    C:\Program Files\PC-Doctor for Windows\services
    What am I supposed to change to get Reports to work again (i.e. do more than just show the splash screen)?
    Forms and Designer work just fine....

    Never mind I found my solution here:
    Re: Oracle Developer hangs when starting...i'm desperate

  • HT5622 hi. i bought iphone 5 witch was locked, i made factory reset and now phone asking apple ID and pasword witch i dont know. i was writing to seller but he is not answering me. how to set new account for my iphone 5 what i could use it?

    hi. i bought iphone 5 witch was locked, i made factory reset and now phone asking apple ID and pasword witch i dont know. i was writing to seller but he is not answering me. how to set new account for my iphone 5 what i could use it?

    The iPhone has a feature called "Activation Lock" described here:
    http://support.apple.com/kb/PH13695
    Without that Apple ID, you will not be able to use that iPhone.

  • How to set Multi User Environment in the weblogic 5.1 and 6.1 server..(Urgently)

    Hi all,
    I need to know how to set Multi User Environment in the weblogic 5.1
    properties file..
    Here my question is..:)
    1) I have a database with multiple users and having different privileges
    for the users.. and i need to use all the privileges when user aceess
    the database through weblogic server connectionPool.
    2)According to the user privileges i need access the database tables
    content and gives the frontEnd(jsp).
    3)How to modify dynamically weblogic.properties file in the weblogic
    5.1.
    If anybody having idea reg. this issues pl...help me..
    Thanks in advance
    Chandu([email protected],[email protected])

    Hi. A JDBC connection pool is a set of identical, interchangeable, pre-made
    connections, and the controls to make sure only one user uses a particular
    connection at any one time. If you want to have different DBMS users, you can
    have a separate pool for each DBMS user, which may contain as many or few
    connections as you want. Some applications has a pool for the accounting
    applications, and another for the sales applications etc. Some do have a
    separate pool for john, jane, joe etc, each with one connection. Pools
    can be created and destroyed dynamically using the dynamic pool API.
    Joe
    softstar wrote:
    >
    Hi all,
    I need to know how to set Multi User Environment in the weblogic 5.1
    properties file..
    Here my question is..:)
    1) I have a database with multiple users and having different privileges
    for the users.. and i need to use all the privileges when user aceess
    the database through weblogic server connectionPool.
    2)According to the user privileges i need access the database tables
    content and gives the frontEnd(jsp).
    3)How to modify dynamically weblogic.properties file in the weblogic
    5.1.
    If anybody having idea reg. this issues pl...help me..
    Thanks in advance
    Chandu([email protected],[email protected])

  • Failed to start up. Please set proper ESSBASEPATH environment variable.

    Hi,
    Recently we have upgraded the 7x to 11x version, Installation looks fine and were able to migrate the zero level data as well. But when i trying to run the Load scripts i am getting the below error
    **Failed to start up. Please set proper ESSBASEPATH environment variable.**
    Below is my environment details
    Setting Server specific environment Variables
    PATH=/usr/local/bin:/bin:/usr/bin:/apps/hyperion/products/Essbase/EssbaseServer/bin:/apps/hyperion/products/Essbase/EssbaseServer:.:/apps/hyperion/products/Essbase/EssbaseServer/bin:/apps/hyperion/products/Essbase/EssbaseServer:.
    ARBORPATH=/apps/hyperion/products/Essbase/EssbaseServer
    LD_LIBRARY_PATH=:/apps/hyperion/products/Essbase/EssbaseServer/bin:/apps/hyperion/products/Essbase/EssbaseServer/dlls:/apps/hyperion/products/Essbase/EssbaseServer/odbc/merant41/lib:/apps/hyperion/products/Essbase/EssbaseServer/bin:/apps/hyperion/products/Essbase/EssbaseServer/dlls:/apps/hyperion/products/Essbase/EssbaseServer/odbc/merant41/lib
    Can you please help me resolving this.

    You will also need an environment variable called ESSBASEPATH
    The value will be the same as ARBORPATH
    Though if you start essbase by using startEssbase.sh then it should pick up the env variables from /hyperion/products/Essbase/EssbaseServer/hyperionenv.doc
    Cheers
    John
    http://john-goodwin.blogspot.com/

  • How to set new sudo password prompt?

    Hi guys, i've a problem with sudo!
    I want set a new password prompt for me but unfortunately don't how to do...
    I set  a defaults line in sodoers file with this syntax:
    Defaults     passprompt="MyPass:"
    but don't work...
    I tried also start sudo with -p paramenter: sudo -p "Mypass:" but nothing
    Someone can help me please...:(

    skymt wrote:
    Actually, sudo has an option for this:
    sudo -p 'Enter your password, %u:'
    '%u' will be replaced with your username. You can also use %H or %h for the hostname with or without the domain, %U for the username sudo will use to run your command, or %% for an actual percent sign.
    If you want to set a permanant prompt, either set the environment variable "SUDO_PROMPT" or set "passprompt" in /etc/sudoers using visudo.
    I tried this solution but don't work for me..
    If i try to do:
    # sudo -p 'My Password:' i've "Password" for pass prompt..
    I've re-checked the sudoers file, is this:
    # sudoers file.
    # This file MUST be edited with the 'visudo' command as root.
    # See the sudoers man page for the details on how to write a sudoers file.
    # Host alias specification
    # User alias specification
    # Cmnd alias specification
    # Defaults specification
    Defaults passprompt="Password:"
    # Runas alias specification
    # User privilege specification
    root ALL=(ALL) SETENV: ALL
    # Uncomment to allow people in group wheel to run all commands
    # and set environment variables.
    %wheel ALL=(ALL) ALL

  • How to set up Oracle Environment... ?

    I have a fresh copy of Oracle Enterprise Linux with Oracle 11g R1 installed.
    Steps that I did and I am trying to understand……
    1.     Boot the OEL server.
    2.     From remote connection, using PUTTY, I connect to the OEL
    3.     I am setting the variables(ORACLE_HOME & ORACLE_SID) with the ‘export’
    4.     Login to sqlplus as sys with sysdba
    5.     Started the database. Everything is fine!
    6.     If I logout of PUTTY and log back all my step 3 variables are gone.
    7.     You know now I can’t start the Oracle database without error.
    My question is……
    How to make the proper environment for Oracle database?
    Do I have to have the above two variable populated all the time. Does these two variables need to be part of any login script (for root)? Once session (shell) has to be running all the time?
    Missing the link here. I am learning.
    Thank you,
    Smith

    For starters, there are several shell environments that you could have set as your default, such as: sh, csh, ksh, bash, tcsh, zsh, or rc.
    Depending which shell environment you have set, you may or will have a different startup file when you login.
    But the basics still apply:
    For the most part, the first thing is that you should not be running anything as root (related to Oracle).
    Oracle should have its own userid and be part of the DBA group.
    Perhaps you mistyped.
    Next, yes, your environment variables will need to be reset when you log back in.
    There are a number of ways to accomplish this.
    One of the most popular ways (although I don't necessarily agree), is to set the environment variables in your login startup script.
    for example, your .profile (dot-profile). For ksh shell, for example, this is run at start up when you log in, after your session has read the /etc/profile script for system wide settings.
    If the environment variables are set correctly, they are exported, which is sourced as your login script runs.
    Alternately, (which I prefer), is you can 'source' the environment variables yourself.
    This is done differently again depending on your default shell.
    For ksh, you simply type . <shell script name>. (That is: dot-space-scriptfile)
    It is important that you include a space between the dot and the file to be executed.
    This will allow you to spawn additional windows from your main window and carry those env parameter settings forward.
    Another option, preferred by Oracle, is that you set the Oracle $PATH in your login script (.profile or whatever), and then execute . oraenv. (dot-space-oraenv). This sources the parameters that are set when you run the oraenv which sets things such as your ORACLE_SID and ORACLE_HOME.
    HTH...

  • Setting persitent system environment variables using java program

    hai,
    Iam tryng to write installation for an application,which require to set some persistent system environment variables using java program. I have tried using set command Runtime.getRuntime().exec("cmd /c set blah blah "),but this applies only to that particular DOS promt only,i presume.And this is not perisistent.please do help.
    Biju

    The solution I proposed worked only on Windows XP/2003.
    The following solution will work on Windows NT/2000/XP/2003 with JDK 1.2+.
    1- Download the [url http://www.gjt.org/download/time/java/jnireg/registry-3.1.3.zip]JNIRegistry zipped archive.
    2- Open the registry-3.1.3.zip file and extract in the folder of your choice ( Eg. c:\setenv ) only the 2 first files (when sorted by path): ICE_JNIRegistry.dll and registry.jar.
    You don't need to keep the folder tree in the extraction.
    3- Create the following SetEnv.java file in the same folder ( Eg. c:\setenv ).
    import com.ice.jni.registry.Registry;
    import com.ice.jni.registry.RegistryKey;
    import com.ice.jni.registry.RegStringValue;
    import com.ice.jni.registry.RegistryValue;
    public class SetEnv
        static final String REG_HKLM_SUBKEY_NAME = "SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment";
        public static void main(String[] args)
        throws Exception
            new SetEnv().exec(args);
        void exec(String[] args)
        throws Exception
            if (args.length != 2)
                throw new IllegalArgumentException("\n\nUsage: java SetEnv {varName} {varValue}\n\n");
            String varName = args[0];
            String varValue = args[1];
            RegistryKey key = null;
            RegStringValue value;
            try
                key = Registry.HKEY_LOCAL_MACHINE.openSubKey(REG_HKLM_SUBKEY_NAME, RegistryKey.ACCESS_ALL);
                value = new RegStringValue(key, varName, RegistryValue.REG_EXPAND_SZ);           
                value.setData(varValue);
                key.setValue(value);
                key.flushKey();
            finally
                try { key.closeKey(); }
                catch (Exception e) {}
    }4- Compile it.
    javac -classpath .;registry.jar SetEnv.java
    5- Run it. varName and varValue are strings of your choice.
    java -classpath .;registry.jar -Djava.library.path=. SetEnv varName varValue

  • How to set reports server environment

    Hi..
    Now Oracle 9iAS r1 (reports60) was installed on Linux, Unix and NT for testing.
    I typed like below in web browser .
    http://IP:Port/dev60cgi/rwcgi60/showenv?server=ServerName
    then Oracle Reports environment variants(REPORTS_PATH, REPORTS... so on..) did not set . except PATH, LI_LIBRARY_PATH and ORACLE_HOME variants like below..
    ====================================================
    Oracle Reports Server CGI60 Environment Variables:PATH /home/ora9iasr1/product/9.0.1/Apache/perl/bin:/home/ora9iasr1/product/9.0.1/bin:/usr/kerberos/bin:.:/usr/local/bin:/usr/java/jdk1.3.1_07/bin:/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/ora9iasr1/bin
    LD_LIBRARY_PATH /home/ora9iasr1/product/9.0.1/6iserver/lib
    ORACLE_HOME /home/ora9iasr1/product/9.0.1/6iserver
    ORACLE_PATH undefined
    REPORTS60_PATH undefined
    REPORTS60_TMP undefined
    REPORTS60_CGIMAP undefined
    ==============================
    I can set it with editing registery on Windows.
    But thought I set it with export option at .bash_profile, reports60.sh and reports_server on Unix platform, it did not affected.
    Please let me know how to set reports environment on Unix.
    regards..
    Ryu,

    The reports CGI is started from script rwcgi60. Did you set those env variables in rwcgi60? Or did rwcgi60 call reports60.sh to set env variables? Please check.
    -Jeff

  • How do you get LOCAL_ADDR environment variable from weblogic?

    How can you access environment variables, such as LOCAL_ADDR? The request object does not expose methods to get at all the environment variables? I need to know which NIC Card the request is coming off of, which the LOCAL_ADDR will tell me.

    Some variables you can?t get this way.
    I made shellscript that just looked like this.
    set > /yourdir/yourfile.txt
    Then in my class I did Runtime.exec(shellxcript);
    then you just read in "/yourdir/yourfile.txt" as Resource and load it in
    a Property object.
    After that you can get variables to.

  • How to set new extreme with old extreme

    how do I set up a gen 3 airport extreme using ethernet wire to newest extreme just bought it yesterday, not set up yet)  to extend  wireless network to far side of house

    I am using my IMac osx 10.8 to make any changes to network and will use it to set up new AEBS,
    Got it, the new AEBS will be the "main" router on the network.
    where I want to put my 3 gen AEBS  as a wired extender of network
    Got it, the older 3rd Gen AEBS will connect to the new AEBS using a wired Ethernet connection and extend the nework.
    Anyway. is this how I should set up my network to extend it with using my gen 3 APBS  and with my new APBS 6h gen?
    Once you have the new AEBS set up and working as your "main" router, other than making the physical Ethernet connection and typing in a device name that you want to use on the 3rd Gen AEBS, AirPort Utility will take care of all the settings for you automatically. You do not need to worry about any of this.
    2nd question, if I get a new AXAC will I get better speeds or will I just get N speeds?
    Not sure what you are asking. Only the new AEBS (and Time Capsule) will deliver 802.11"ac" speeds. Your 3rd Gen AEBS will deliver "n" speeds as will an AirPort Express.
    3rd. can i after I set up a roaming network then use my old AX (A1264) to stream music to speakers/stereo?
    Yes
    will it be able to be wireless, or will the dreded Apple rule of not using 3rd repeater come into play?
    Wireless
    Also do you have any fixes for Roku 3 not playing well with the new APBS
    Sorry, I have no "hands on" experience with any Roku products, so cannot help on that.
    Suggested plan:
    First, get the new AEBS set up as your new "main" router and check it out for proper operation. AirPort Utility will guide you through the setup.
    Post back when you have done this and then I will provide tips on how to set up the 3rd Gen AEBS to extend the network using Ethernet. Setup is very easy if you follow the steps.
    Once the 3rd Gen AEBS is setup and working, then the A1264 AirPort Express will get attention. Setup will very easy using AirPort Utility.

  • How to set new APN on iphone6 plus

    i am using iphone6 plus with IOS version 8.1.2  and try to set a new APN on cellphone, but didn't found the option.
    Why does my Cellular Data not have the APN settings to edit?
    Setting----cellular----(only have data roaming,personal hotspot)
    someone knows how to set a new APN on iphone6 Plus, thank you very much.

    Greetings wangxiaobao,
    You can change the APN setting on your iPhone using the steps in this article - 
    iOS: About cellular data network settings (viewing or editing the APN) - Apple Support
    Thanks for using Apple Support Communities.
    Be well,
    Brett L 

  • How to set  newer version of stored pages option as never using  httpd.conf

    How to set check for newer version of stored pages option(Tem Internet file-> Setting ) as never using httpd.conf file?

    See:
    *http://kb.mozillazine.org/browser.cache.check_doc_frequency
    To open the <i>about:config</i> page, type <b>about:config</b> in the location (address) bar and press the "<i>Enter</i>" key, just like you type the url of a website to open a website.<br />
    If you see a warning then you can confirm that you want to access that page.<br />
    *Use the Filter bar at to top of the about:config page to locate a preference more easily.
    *Preferences that have been modified show as bold(user set).
    *Preferences can be reset to the default or changed via the right-click context menu.

  • How do you get your environment variables seen in SS?

    I am trying out SS, we currently use gcc/Kdevelop. When I try to launch my program or debug inside Sun Studio I get an error about a missing .so. Since everything works fine from the command line I assume SS does see my shell environment variables. I don't see any option for this, what am I missing?

    First of all, you can check whether environment is inherited or not from dbx command line:
    - start debug session
    - go to "Dbx console" tab at the bottom
    - issue 'set' command and/or 'set | grep your_variable' to see if it is there
    If it's really missing or has value other that expected, use project properties to specify environment for the application. It can be done like this:
    - right-click project in Projects window, choose Properties
    - select "Running" node
    - and edit the "Environment" field

  • How to set new password if you don't remember old ...

    Hello,
    I can still login with Microsoft account, but Skype keeps rejecting my skype password. Tried to recover it using dialog box, but this doesn't work - it either, moving me rounds and rounds without possibility to set new or view old password, either proposing me to change my Facebook password though my Facebook account isn't linked to Skype. Crazy, isn't it? By the way, those security codes are totally useless in case when smallest string in Skype scripting fails.
    Spend hours reading topics. Nothing that could help. I have never seen any other network, service or software wich was so uhelpful in recovering passwords and feel sorry for what I have to use Skype and not something reliable and trouble-free.
    Still problem remains insolved an I have no clue how to change Skype password in accessible way.
    Thank you for any helpful reply, if ever I will have some at this.. place.

    You need to ask Apple to reset your security questions; ways of contacting them include clicking here and picking a method for your country, phoning AppleCare and asking for the Account Security team, and filling out and submitting this form.
    They wouldn't be security questions if they could be bypassed without Apple verifying your identity.
    (103250)

Maybe you are looking for