How to set a session variable

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

Similar Messages

  • How to get the session variable value in JSF

    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-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
    but it retrieve only "null" value.. could u please help me.. it's very urgent one..

    Where i use 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..

  • 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?
    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.

    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

  • 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.

  • How to set the header variables in weblogic

    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..
    Ramesh P.

    maybe you are looking for the routing options

  • 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?
    Best Regards

    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 -
    Hope this helps,
    Author of Pro Application Express:

  • 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 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...

    use this code IN FORMS60 variable in Regedit

  • 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?

    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
    // script1.php
    echo "<form action=\"script2.php\" method=\"post\"
    echo "Your name: <input name=\"name\" type=\"text\"
    size=\"20\" value=\"\">  ";
    echo "<input name=\"submit\" type=\"submit\"
    echo "</form>";
    second page
    // script2.php
    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.
    if (isset($_POST['name1'])) $_SESSION['name1'] =
    echo 'Hello, ' . $_SESSION['name1'];
    By the way, using echo to create your form on page one is a
    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)

  • 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 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() {
    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();
    se.setVariableSesion("DatosRec", da);

Maybe you are looking for