Accessing environment variables

Good morning,
I have an implementation of Oracle Application Server 10G using a Shibboleth Service Provider (SP) 2.1 for SSO authentication. The problem I am facing now is to accessing with APEX the environmental variables created by the SP. In my tests I used PHP and everything is working well. However with APEX I only have access to a very limited group of environment variables. Anybody have a suggestion or idea on how to solve this problem?
The variable I need is "Login".
Thank you very much.
hugo

Hello,
Take a look at this thread, where I answer a similar problem -
Re: Unable to access external HTTP Headers
Hope this helps,
John.
Blog: http://jes.blogs.shellprompt.net
Work: http://www.apex-evangelists.com
Author of Pro Application Express: http://tinyurl.com/3gu7cd
REWARDS: Please remember to mark helpful or correct posts on the forum, not just for my answers but for everyone!

Similar Messages

  • Accessing environment variables in PL/SQL??

    I have two oracle schemas; myenv1 and myenv2. They are both exact copies from each other except for the fact that one is my "developement" environment and the other my "production" environment.
    So in each of them I have some packages with PL/SQL code.
    I'd like to have an environment variable called PLATFORM (maybe not the best name) that should have the value "devel" in one schema and the value "prod" in the other schema. And I'd like to be able to access this variable in my PL/SQL code so I can slightly change some code or conditionate some code to the production environment only... or stuff like that.
    Does anyone know how to do that? (where and how to configure the env. variable)
    Any help will be most appreciated.
    Thanks!

    but I'm using the same 'current_user' in both schemas... is there other values I can get with sys_context ?? maybe there's one that would do it... but i think it's not 'current_user' It should be. Consider:
    SQL> show user
    USER is "SCOTT"
    SQL> create or replace function show_user return varchar2
      2  as
      3  begin
      4    return sys_context('userenv','current_user');
      5  end show_user;
      6  /
    Function created.
    SQL> select show_user from dual;
    SHOW_USER
    SCOTT
    SQL> grant execute on show_user to test;
    Grant succeeded.
    SQL> connect test/test
    Connected.
    SQL> select scott.show_user from dual;
    SHOW_USER
    SCOTT

  • WebForms - Accessing Environment Variable on a Windows Client

    Hi. We access a Windows Environment Variable using Client-Server Forms 6i. We do this as follows:
    Tool_Env.GetVar('ALLUSERSPROFILE', myPath);
    message(myPath);This returns the value 'c:\documents and settings\all users' on Windows XP.
    This returns the value 'c:\programdata' on Windows 7.
    We'd like to keep similar logic in this form once it's migrated to Web Forms. Is there a way to access this 'allusersprofile' environment variable (or any environment variable to determine whether the user is XP or Win7) from a web form running our UNIX server? Maybe somehow using WebUtil or something?
    Any suggestions would be greatly appreciated. Thanks.

    WebUtil enable your form then do this:
    message (CLIENT_WIN_API_ENVIRONMENT.Get_Environment_string('allusersprofile'));To get the Windows version, do this:
    message(CLIENT_WIN_API_ENVIRONMENT.Get_Windows_Version);.
    Edited by: Michael Ferrante on May 23, 2012 5:06 PM

  • Access environment variables

    Hi,
              I'm running WebLogic 5.1 sp12 with an Apache 1.3.27 web server.
              Apache sets an environment variable ('REDIRECT_URL') upon occurence of
              a 40x error. How do I access such an environment variable from my jsp
              page? Thanks - Dave
              

              [email protected] (D. Alvarado) wrote:
              >Hi,
              > I'm running WebLogic 5.1 sp12 with an Apache 1.3.27 web server.
              >Apache sets an environment variable ('REDIRECT_URL') upon occurence of
              >a 40x error. How do I access such an environment variable from my jsp
              >page? Thanks - Dave
              Hi Dave,
              Hope this link will help you.
              http://developer.java.sun.com/developer/JDCTechTips/2001/tt1204.html#tip1
              Prema
              SIP Technologies & Exports Ltd., India
              

  • How to access environment variables from pluggable destination?

    Hi,
    I'm trying to create a java puggable destination for reports. Everything is working fine.
    I want to access reports environment variables from the java code (like REPORTS_PATH and other new variables that I want to create), but I can't find anything about this in the java API documentation.
    I want to use environment variables instead of destination properties (those I can easily access), because I want to be able to change context using env_id.
    Any ideas?
    Thanks,
    Luis

    I'm using Oracle Application Server Version 10.1.2.0.2
    Thanks

  • How to access environment variables from Oracle Forms

    Hi,
    Any idea how to use the Environment variables from Oracle Forms.
    My basic problem is that from Oracle form I am calling Batch file which calls excel file with a macro.
    So i want to check whether the macro was successful or not.
    So in my batch file i will set %errorlevel% which I should be able to read from Oracle Forms.
    I am able to read the registry from oracle forms, so is there anyway to read environment variable as well?
    Thanks!
    Avinash.

    Hello,
    Use the TOOL_ENV.Getvar() built-in
    Francois

  • Set environment variable in oracle 10g application server control rel3

    hi all,
    i am trying to connect to emc centera through 10g rel3 , here i am getting error .
    error name is:
    com.filepool.fplibrary.FPLibraryException: Error loading FPLibrary or one of its dependencies
    at com.filepool.fplibrary.FPPool.<init>(Unknown Source)
    if any body knows please help me.
    Thanks and regards
    Pravin

    Hello,
    Take a look to http://buttso.blogspot.com/2006/08/accessing-environment-variables-from.html
    Regards
    Tugdual Grall

  • 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 does java access user specific environment variables ?

    Hi,
    I'm running a java application on a W2K o/s. My application needs to be able to access the user environment variables in Windows but I don't know how to do this. Can anyone help ?
    Thanks.

    http://www.rgagnon.com/javadetails/java-0150.html

  • Accessing shell environment variables inside OMBPlus script

    Hi,
    I have a problem accessing an environment variable inside OMBPlus script. I can 'see' the env. var values when using tclsh, but when I use OMBPlus.sh it doesn't work?
    Anybody has an example of how to do this?
    For example: puts $::env(MYVAR)
    Thanks,
    Ed

    Hello!
    Issue the command:
    puts [array names env];
    this will print you the content of the env array which is definitely not the environment variables.
    If you want your environment variable appear in the env tcl variable then you must edit the ombplus.bat file and pass it through a java option like this:
    -DMYENV="%MYENV%" (on windows assuming you declared MYENV).
    Now puts $env(MYENV) will work.
    Regards,
    Robert

  • Accessing Tomcat Global Environment Variables

    Hello,
    I have tried to access Tomcat 5.0 (xx) Global Environment variables.
    I have the Integer simpleValue defined in the Tomcat Administrators panel under "Environment Entries"
    Here's my code:
    Context initContext = new InitialContext();
    Context envContext = (Context)initContext.lookup("java:comp/env");
    Integer i = (Integer)e.get("simpleValue");
    I have also tried and infiinite variation of this with no success (Accessing the Initialcontext directly)
    The Tomcat docs at: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-resources-howto.html
    says:
    "<Environment> - Configure names and values for scalar environment entries that will be exposed to the web application through the JNDI InitialContext (equivalent to the inclusion of an <env-entry> element in the web application deployment "
    PLEASE HELP !!!
    Geir Ove

    This is a Tomcat bug. See http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14228.

  • Access OS environment variable to be used in automatic application login

    I want users to login to an APEX application automatically using the username that is stored in an OS environment variable. I already tried owa_util.print_cgi_env, but that does not contain the values I need.

    Hello,
    Sounds like you're trying to do NTLM authentication? Take a look at the whitepaper -
    http://www.oracle.com/technology/products/database/application_express/pdf/apex_ntlm_authentication_wp.pdf
    John.
    http://jes.blogs.shellprompt.net
    http://www.apex-evangelists.com

  • Unable to access value in System Environment Variable using Java

    I am using Java code to get the value of a System Environment Variable using the Runtime, Process java classes.
    The code works fine in tomcat, but when deployed in 9ias the code is unable to retrieve the value stored in the System environment variable in Windows 2000.

    Thanks for the comment steve, here is the code which i am using.
         public String getEnvironmentVariable()
                   // This will get the FEDREP_HOME environment variable
                   String FEDREP_HOME = null;
                   Process p = null;
                   Runtime rt = Runtime.getRuntime();
                        try {
                             // invokes a shell-command to retrieve FEDREP_HOME variable
                             String OS = System.getProperty("os.name").toLowerCase();
                                  // Get the Windows 95 environment variable
                                  if (OS.indexOf("windows 9") > -1)
                                            p = rt.exec( "command.com /c echo %FEDREP_HOME%" );
                                  // Get the Windows NT environment variable
                                  else if (OS.indexOf("nt") > -1)
                                            p = rt.exec( "cmd.exe /c echo %FEDREP_HOME%" );
                                  // Get the Windows 2000 environment variable
                                  else if (OS.indexOf("2000") > -1)
                                            p = rt.exec( "cmd.exe /c echo %FEDREP_HOME%" );
                                  // Get the Windows XP environment variable
                                  else if (OS.indexOf("xp") > -1)
                                            p = rt.exec( "cmd.exe /c echo %FEDREP_HOME%" );
                                  // Get the unix environment variable
                                  else if (OS.indexOf("linux") > -1)
                                            p = rt.exec( "sh -c echo $FEDREP_HOME" );
                                  // Get the unix environment variable
                                  else if (OS.indexOf("unix") > -1)
                                            p = rt.exec( "sh -c echo $FEDREP_HOME" );
                                  // Get the unix environment variable
                                  else if (OS.indexOf("sunos") > -1)
                                            p = rt.exec( "sh -c echo $FEDREP_HOME" );
                                  } else
                                            System.out.println("OS not known: " + OS);
                             // set up to read subprogram output
                             InputStream is = p.getInputStream();
                             InputStreamReader isr = new InputStreamReader(is);
                             BufferedReader br = new BufferedReader(isr);
                             // read output from subprogram
                             FEDREP_HOME = br.readLine();
                             br.close();
                        } catch(Exception ex)
                                  System.out.println("Error when getting FEDREP_HOME environment variable");
                                  ex.printStackTrace();
              return(FEDREP_HOME);

  • How to access %programfiles% environment variable in XML

    Hi
    I am trying to install BEA JRockit 1.4.2 JVM silently and I need help in modifying the silent.xml file. Typically, in batch files, one would use the environment variable %programfiles% to install to the system's program files directory. However I want to do this within the silent install file that BEA recommends. The line that I want to modify is:
    <data-value name="USER_INSTALL_DIR" value="D:\Program Files\Java\jrockit-24.5.0-j2sdk1.4.2_08" />
    To something more like:
    <data-value name="USER_INSTALL_DIR" value="<b>${programfiles}</b>\Java\jrockit-24.5.0-j2sdk1.4.2_08" />
    However this does not work for me. Any help is greatly appreciated.
    Thanks,
    Jaaved

    Hi Jaared,
    You will have to create an additional wrapper that generates the silent.xml
    of your choice with a value of USER_INSTALL_DIR based on the value of the
    %PROGRAMFILES% environment variable. The value of USER_INSTALL_DIR is
    currently interpreted literally and there does not exist any support for
    expansion of environment variables in it. Based on your question we might
    consider this feature for a future release though.
    Regards
    /Robert
    <Jaaved Mohammed> wrote in message news:[email protected]..
    Hi
    I am trying to install BEA JRockit 1.4.2 JVM silently and I need help in
    modifying the silent.xml file. Typically, in batch files, one would use
    the environment variable %programfiles% to install to the system's program
    files directory. However I want to do this within the silent install file
    that BEA recommends. The line that I want to modify is:
    <data-value name="USER_INSTALL_DIR" value="D:\Program
    Files\Java\jrockit-24.5.0-j2sdk1.4.2_08" />
    To something more like:
    <data-value name="USER_INSTALL_DIR"
    value="<b>${programfiles}</b>\Java\jrockit-24.5.0-j2sdk1.4.2_08" />
    However this does not work for me. Any help is greatly appreciated.
    Thanks,
    Jaaved

  • How do I clear environment variables in 10.6

    I am having some difficulty in configuring custom paths with my environment variable, environment.plist.  In setting up some of my software, I am trying to configure custom paths so that I can eventually store preferences on the server for all users to access the same tools.  I had this working up until last week, when I installed a second piece of software, that modified my environment.plist file, which now doesn't work at all.
    My original environment.plist file, which is located in ~/MacOSX, was as follows:
    <plist version="1.0">
      <dict>
        <key>NUKE_PATH</key>
        <string>/Users/jamesdavidson/Documents/Nuke_Gizmos/Nuke</string>
        <key>OFX_PLUGIN_PATH</key>
        <string>/Users/jamesdavidson/Documents/Nuke_Gizmos/OFX</string>
      </dict>
    </plist>
    Which worked just fine.  It was then changed to:
    <plist version="1.0">
      <dict>
        <key>NUKE_PATH</key>
        <string>/Users/jamesdavidson/Documents/Nuke_Gizmos/Nuke</string>
        <key>OFX_PLUGIN_PATH</key>
        <string>/Users/jamesdavidson/Documents/Nuke_Gizmos/OFX</string>
        <key>PATH</key>
        <string>/bin:/sbin:/usr/bin:/usr/sbin:/usr/libexec:/Applications/Deadline/Resou rces/bin</string>
      </dict>
    </plist>
    and now, the only variable that shows up is PATH.  I edited the file back to the original, without the PATH variable, restarted my machine, and yet my Variables did not change...  Is there somewhere else that I should be looking?  Some other file?   this is what I get from terminal:
    $ echo $NUKE_PATH
    $ echo $OFX_PLUGIN_PATH
    $ echo $PATH
    /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Applications/Deadline /Resources/bin
    And this even after deleting my environment.plist file.  Any help would be appreciated.
    Thanks,
    James

    I hope you made a typo in your post and meant ~/.MacOSX.  You typed ~/MacOSX, i.e., without the leading dot.
    At any rate $PATH is a predefined shell variable so I suspect you cannot define that one with this environment.plist mechanism.  The "proper" way to set up such things is with a  ~/.bash_profile, ~/.bash_login, ~/.profile, or IMO, best of all. ~/.bashrc.  These are scripts the shell looks for during launch (somewhat depending on whether it's a login shell or not -- see the bash reference manual).
    If bash is executed interactively it will also first look for /etc/profile.  And it will cause a $PATH variable to be created.  So that is probably the definition you are seeing all the time until you create an appropriate startup script of your own (e.g., ~/.bashrc) to override or modifiy the existing $PATH variable.
    Note, I may have paraphrased a lttile too much so see section 6.2 Bash Startup Files in the bash reference documentation for the complete proper description of the order these files are used.  If you have the developer tools installed look for bashref.html.  Otherwise it's online here.
    Finally, if you look at /etc/profile you will see it attempting to execute /usr/libexec/path_helper -s.  Try that in terminal and see if that isn't the $PATH definition you are currently seeing.

Maybe you are looking for

  • Doubts in Reconcile Report

    Hi I need a small clarification on the Reconcile Report.I find that the reconcile report generates the report for an object.Is there any option to get the report for all the objects in the database. Thanks, Suji

  • Batch delete activities

    I am trying to perform a batch delete on activities that were incorrectly loaded into the CRM. I use the advanced search function to isolate the activities that need to be deleted. I then use menu and select batch delete. The batch delete is loaded a

  • HFM cluster error

    Hello Experts, I would like to introduce security issue which we are getting. We already have the Production environment in our network and in HFM it contains the cluster name as *"HFM"*. We have introduced another environment called Production1 in t

  • Enable oracle 10g on windows 2003 R2 X64 edition to address 8 Gb memory

    We are using Oracle 10g R2 on Windows 2003 R2 x64 Standart edition. Lately we upgraded the system memory from 4 Gb to 8 Gb. Windows sees the memory as is (8 Gb) But oracle can not see the RAM as 8 gb. How can we ovecome this problem. Best Regards, Mu

  • Succesfull WSAstartup not yet performed (error 10093)

    When lab-view is started up, the following error-message appears: "Error 10093 occurred at PSC_ETH Close Lowest Level.vi." couls somebody help? BR Søren Bækhøj Kjær