How to set a session variable

Hi,
I would like to know how to set a session variable for the following purpose.
At the top of my application I have a "Welcome <username>" I'd like it instead to have "Welcome <firstname> <lastname>".
So the concept would be after the user logs in succesfully this session variable is dynamically set so it can be displayed.

Hi Scott,
I realize that I can set items etc in pages. The case I'm referring to is a reference in a template. My template has a "Welcome <user name>" ... so the code looks like "Welcome &APP_USER." Anyway to make it say "Welcome first_name last_name" in the template? Note I'll have to get the first/last names from a query
Thanks,
Marty

Similar Messages

  • How to get the session variable value in JSF

    Hi
    This is Subbus, I'm new for JSF framewrok, i was set the session scope for my LoginBean in faces-config.xml file..
    <managed-bean-name>login</managed-bean-name>
    <managed-bean-class>LoginBean</managed-bean-class>
    <managed-bean-scope>session</managed-bean-scope> like that...
    So all parameter in LoginBean are set in session right ?... for example i used userId is the Parameter...
    Now i need to get the the userId parameter from that session in my another JSP page.. how i get that ?..
    Already i tried
    session.getAtrribute("userId");
    session.getValue("userId");
    but it retrieve only "null" value.. could u please help me.. it's very urgent one..
    By
    Subbus

    Where i use that..is it in jsp or backend bean...
    simply i use the following code in one backend bean and try to get the value from there bean in the front of jsp page...
    in LogoutBean inside
    public String getUserID()
         Object sessionAttribute = null;
         FacesContext facescontext=FacesContext.getCurrentInstance();
         ExternalContext externalcontext=facescontext.getExternalContext();
         Map sessionMap=externalcontext.getSessionMap();
         if(sessionMap != null)
         sessionAttribute = sessionMap.get("userId");
         System.out.println("Session value is...."+(String)sessionAttribute);
         return (String)sessionAttribute;
         return "fail";
    JSP Page
    <jsp:useBean id="logs" scope="session" class="logs.LogoutBean" />
    System.out.println("SS value is ...."+logs.getUserID());
    but again it retrieve only null value.. could u please tell me first how to set the session variable in JSF.. i did faces-config only.. is it correct or not..
    By
    Subbus

  • How set a SESSION variable?

    How set a SESSION variable?
    There is a standard object where could do this?
    Thx in advance Roberto.

    >I'm not at all sure that you CAN change the portal language in the way that you want.
    >Perhaps you should repost this question in the portal forum.
    No i manage the language of WebDynpro myself, with tables from R3.
    I wanna do only a thing like HTTP SESSION variable from the WEB.
    I could do it, using java function of servlet, but i don't wanna use third packege out of WebDynpro FRAMEWORK.
    The isn't an OBJECT CLASS STANDARD od WebDynpro that do that?
    I wanna PERMANENT variable from a WebDynpro to another.
    It is an implicit variable passage.
    No one did something of similar?
    Bye
    Message was edited by: giovanni angerame

  • Can I set a Session Variable from a Dashboard Prompt, using values that are

    Hi All
    Trying to set a Session Variable to an integer value, by letting users select a text value from the drop-down list on a Dashboard Prompt. The goal is to set the input parameter to the IndexCol function, but to provide the end users with a text description of what they are setting.
    Select Value Set Variable Value
    My 0
    My Team 1
    My Companies 2
    My Teams Companies 3
    Any suggestions on how to accomplish this? Certainly we could populate the drop-down from a data source, however I don't see how to populate a variable with something other than the values on the screen.
    The IndexCol function is referenced in a Filter in Answers, and I'm thinking to populate a Session variable using the (Presentation) variable value set from the prompt. But how to do this? I see a reference to a function NQSSetSessionValue(), but cannot find documentation on how it works.
    Any clue will be greatly appreciated.
    Thanks

    Hi kishore..
    Looks like the link u have sent uses advanced SQL tab to set session variables. I want to know if I can use "set variable NQ_SESSION.myvar= @something" in the "SQL results" -while creating a dashboard prompt-.
    Purpose: I want the session variable to be set based on whatever report that im currently in.
    And i dont want to use presentation variables because im using a reset button in my page.
    My reset script resets presentation variables and NOT session variables.
    Thanks in advance
    Loy

  • How long does a session variable live?

    I have a logon servlet that sets a session variable (validated) and then I reference that variable from various JSP pages. Does the timeout timer start when I last hit the logon servlet or should the session remain persistent as long as the browser is active up until the engine timeout is reached for the zone? I'm using Apache 1.3 with JServ (Oracle 9iAS R2) so unfortunately setMaxInactiveInterval does not work.

    There are timeout settings that can be set, check web.xml documentation for this and this can also be set in the App Server(at least for WAS). You also have to be concerned about how much memeory too and I know WAS has settings concerning session timeouts and memory.
    HTH,
    J.Clancey

  • How to set the header variables in weblogic

    Hi,
    We have a following set up in our environment.
    We have weblogic and on the top of it we have apex listener deployed which redirects Oracle Apex.
    My Issue:
    How can we set up the header variables in weblogic once the user is authenticated against weblogic server.
    We are struck here, not knowing how to set the header variables in weblogic server. Its fairly straight forward for Oracle Access Manager or others..
    Thanks
    Ramesh P.

    maybe you are looking for the routing options
    http://docs.oracle.com/cd/E13159_01/osb/docs10gr3/userguide/modelingmessageflow.html#wp1125348

  • How to Create a Session variable in JSP?

    How to create a session variable and add attributes to it?
    For example i want to create a session variable called "name" and add value "user" to it? if i try to do it with setAttribute(), it is giving error as both is of type string? how to do it? kindly help me

    This is variable what is working in my aplication
    String variable;
    if(user == null){
                   user=new String("");
         }//if you don'y do this you will have null pointer exception
    session.setAttribute("user",user);//put value
              String name=(String)session.getAttribu("user");      //get value;
    I hope this will help

  • How to create a session variable in Apex?

    Hello colleagues,
    Is there someone do know how to create a session variable in Apex?
    How to get them?
    Thanks
    Best Regards

    Hello,
    What do you mean by 'session variable'? You mean something that stores the value int he users session state?
    I really recommend reading the 2-Day Developer guide documentation, there is a complete section on session state -
    http://download.oracle.com/docs/cd/E10513_01/doc/appdev.310/e10499/concept.htm#CIHCFHBD
    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

  • How to set the path variable on Windows ME?

    I want to get a friend of mine to start using java the only problem is that we both dont know how to set the path variable in Windows ME. I cant seem to find any instructions on it for ME. So if someone could please tell me how or give me a llnk to directions for Windows ME. Thanks.

    Refer to the Installation Instructions for the package that you installed - I believe #5 if the instructions has the information. A link to the instructions is at the page you installed from.

  • How can we use Session Variable in Answers or Analysis?

    How can we use Session Variable in Answers or Analysis?

    Again, duplicate cross-posting!
    See rukbat 's post here: Re: BI Apps 7.9.6.3(Agent Issue)

  • How to set ORACLE_HOME environment variables in win 2003

    Can anyone tell me how to set ORACLE_HOME environment variables in Win2003
    Please tell me the significance of that also.It will be really helpful if u can help me out from Path variable seting of JAVA SDK also... Thanks in advance...

    hi
    use this code IN FORMS60 variable in Regedit
    \\server\DATA\store\Forms;
    Rizwan

  • How to set the session using onClick event?

    Dear All,
    I have a link, which once the user click on it, I want to set the session.
    <a href="link.jsp" > Link </a>How to set the session? Where should I put <%session1.setAttribute ("test", "1234"); %>?
    Any idea?
    Thanks

    when u click on Link
    the control goes to link.jsp/.
    and in this page u can write the session related code.

  • Can someone tell me why this is not setting the session variable?

    first page
    <?php
    // script1.php
    session_start();
    echo "<form action=\"script2.php\" method=\"post\"
    name=\"name1\">";
    echo "Your name: <input name=\"name\" type=\"text\"
    size=\"20\" value=\"\">  ";
    echo "<input name=\"submit\" type=\"submit\"
    value=\"Submit\">";
    echo "</form>";
    ?>
    second page
    <?php
    // script2.php
    session_start();
    echo('Hello, ' . $_SESSION['name1']);
    ?>

    jlw12689 wrote:
    > second page
    >
    > <?php
    > // script2.php
    > session_start();
    > echo('Hello, ' . $_SESSION['name1']);
    > ?>
    You need to set the session variable first.
    <?php
    session_start();
    if (isset($_POST['name1'])) $_SESSION['name1'] =
    $_POST['name1'];
    echo 'Hello, ' . $_SESSION['name1'];
    ?>
    By the way, using echo to create your form on page one is a
    complete
    waste of time. Just use an ordinary HTML form - a lot less
    typing, and a
    lot more efficient.
    David Powers
    Adobe Community Expert
    Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
    http://foundationphp.com/

  • How to set the Environment Variable

    I'm going through a tutorial on how to create an application and run from the command prompt. I have finished installing my jdk 6 Upadate 5 but i don't know how to set the Environment Variable for the javac compiler and the java interpreter to find my program.
    I have created an application called "ExampleProgram" and have saved it on drive C:. How do i set the Environment Variable so that the "javac" compiler and the "java" interpreter can find it

    gyesa_say wrote:
    I'm using Windows XP Service Pack 2.A very bad choice to go with Windows. Personally I prefer Linux.
    I Google and had several information on how set it, but i tried all of them and none seem to work.I typed "how to set environmental variable in winxp" in Google and the very first link provided all the information I needed (you need). These things will make much more sense if you go through it yourself rather than having someone else spoon-fed you the answer.

  • How to get and set a session variable from backing bean?

    Hi im using Jdev 11.1.1.2.0 and i need to set and get a session variable from backing Bean.
    Any idea?

    the class :
    package arq.resources;
    import javax.faces.context.FacesContext;
    import javax.servlet.http.HttpSession;
    public class SesionSigef {
    public FacesContext context;
    public HttpSession session;
    public SesionSigef() {
    super();
    context = FacesContext.getCurrentInstance();
    session = (HttpSession)(context.getExternalContext().getSession(true));
    public Object getVariableSesion(String atributo){
    return session.getAttribute(atributo);
    public void setVariableSesion(String atributo,Object valor){
    session.setAttribute(atributo, valor);
    the example of use :
    SesionSigef se = new SesionSigef();
    DatosRec da = new DatosRec();
    da.setDocumentoCip("Aprobar");
    se.setVariableSesion("DatosRec", da);
    thanks
    Joaquin

Maybe you are looking for

  • HP Officejet pro 8610 not connected

    I have a new modem and separete Duel Router.    Router is Lynksis EA3500 with 2.4 Ghz and 5 Ghz capabilities.   Just bought a new HP Officejet Pro 8610 which I now have learned will only run on a 2.4 GHz system.   When I connect the printer to the wi

  • Macbook pro time reset too 12:00am 2001

    when i turned on my macbook pro this morning I got a message saying that the clock was set to a date earlier than 2008 (the actual date was 1/1/01) and this may cause problems. I also got a load of messages asking me to authorise a load of things ive

  • Ipod does not respond to computer/Itunes, but reboots constantly.

    I have been using the same Ipod since 2/14/2006 (Black 30GB-5th Generation). Never had any problems with it at all. About 4 days ago, I updated to the latest version of Itunes (Ver 7.6.2.9.) and I have been having problems with my Ipod ever since. Ev

  • Indesign CS 4 assignment panel not available on mac

    Using indesign CS4. Assignment panel under window menu is not available. Any help will be appraciated

  • PROBLEM WITH EMC

    I just started an online Oracle dba class and installed 10g Enterprise. I'm not sure why, but Enterprise manager console is not anywhere on the start menu. I've tried re-installing and checked the options to make sure that I didn't miss an option to