How to store session variable in portal?

Hi All,
I have many webdynpro applications in portal. One of them displays list of project numbers read from backend. If user selects a project number and clicks OK button on that view, the same project number should be made available in all the other applications.
For this purpose, I want to store the project number in the session.
Is it necessary to create a portal service to store the session variable?
Thanks and Regards,
Deepti

Hi Deepti,
  Through portal eventing you can pass data in the String format from Web Dynpro application to Portal application using WDPortalEventing API. Please check it.
Regards,
Ganga.

Similar Messages

  • How to store session variables in drop down menu (and radiobutton/checkbox)

    How am I going to store session variables in the drop down menu, radio button, checkbox.
    In text area, I do like below:
    <input type="text" name="membershipno" size="5" maxlength="50" value="<%=((session.getValue("Smembershipno")!=null)?session.getValue("Smembershipno"):"") %>">
    Any idea?

    Hi jeffkyt79, I could have answered this on Expert's Exchange. But I suppose it would be hard as the site is down right now :-(
    Here is sample code for the form:
    <form action="" name="form1">
    <input type="text" name="field1" value="<%
    if (session.getAttribute("field1")!=null) {
    out.println(session.getAttribute("field1"));
    } %>"><br>
    <input type="text" name="field2" value="<%
    if (session.getAttribute("field2")!=null) {
    out.println(session.getAttribute("field2"));
    } %>"><br>
    <input type="text" name="field3" value="<%
    if (session.getAttribute("field3")!=null) {
    out.println(session.getAttribute("field3"));
    } %>"><br>
    <input type="checkbox" name="check1" value="tick"<% if (session.getAttribute("check1")!=null) out.println(" checked"); %>><br>
    <% String selRadio=(session.getAttribute("r1")!=null)?(String)session.getAttribute("r1"):""; %>
    <input type="radio" name="r1" value="yesdot"<% if (selRadio.equals("yesdot")) {out.println(" checked");} %>>
    <input type="radio" name="r1" value="nodot"<% if (selRadio.equals("nodot")) {out.println(" checked");} %>><br>
    <select name="sel">
    <% String selOption=(session.getAttribute("sel")!=null)?(String)session.getAttribute("sel"):""; %>
    <option value="option1"<% if (selOption.equals("option1")) {out.println(" selected");} %>>OPTION 1
    <option value="option2"<% if (selOption.equals("option2")) {out.println(" selected");} %>>OPTION 2
         <option value="option3"<% if (selOption.equals("option3")) {out.println(" selected");} %>>OPTION 3
    </select>
    </form>
    And here's the revised javascript function to put in form1.jsp:
    function newWin() {
    f=document.form1.elements;
    str="?";
    mypage="test2.jsp"; // I've hardcoded the url for testing but you can fix this
    for (i=0;i<f.length;i++) {
    if (f.type=="text") {
    if (f[i].value!="") {
    str=str+f[i].name+"="+f[i].value+"&";
              continue;
         if (f[i].type=="checkbox"||f[i].type=="radio") {
         if (f[i].checked) {
         str=str+f[i].name+"="+f[i].value+"&";
         if (f[i].type=="select-one") {
         str=str+f[i].name+"="+f[i].options[f[i].selectedIndex].value+"&";
    str=str.substr(0,str.length-1);
    // now open the popup
    mypage+=str;
    win=window.open(mypage, 'myname'); // I've left out the winprops but you can fix this
    If you can ask any more questions, could you do it on EE (if possible!!). I know this works because I've tested it.

  • How to set a variable in portal session using web dynpro java.

    Hi,
    I have created a web dynpro application, which is running inside portal. I have created a role called "R1". Inside role R1, i have created 3 workset W1, W2 and W3. and inside each workset i have some pages and iviews.
    My requirement is when user logins to the portal , and when he clicks on role R1 for the first time, a login page should come (so that we can do revalidation), and when he enters his password again in that login page , then only workset W1, W2 and W3 should be visible/accessible to him and after successful revalidation, if he clicks again on role R1, in that particular portal session, than that login page should not come.
    for this, i thought i will set a variable in portal session, whenever user successfully revalidated himself, and if after successful revalidation he clicks again on role R1, i will check in doinit method of webdynpro whether variable is set or not (which i already set on successful revalidation), and if it is set then i will do Donavigation else i will present login page to the user.
    Can anyone tells me how to set a variable in portal session using web dynpro java.
    thanks
    Arush

    Hi,
    Try this:
    WDScopeUtil.put(WDScopeType.CLIENTSESSION_SCOPE, key, value)
    WDScopeUtil.get(WDScopeType.CLIENTSESSION_SCOPE, key)
    Ex:
    WDScopeUtil.put(WDScopeType.CLIENTSESSION_SCOPE,"Key1","Value1");
    String value1=WDScopeUtil.get(WDScopeType.CLIENTSESSION_SCOPE,"Key1").toString();
    /people/william.cui/blog/2007/02/12/sharing-session-context-between-parent-and-external-windows-running-on-same-host
    Regards,
    Charan

  • 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

  • How to pass session variable value with GO URL to override session value

    Hi Gurus,
    We have below requirement.Please help us at the earliest.
    How to pass session variable value with GO URL to override session value. ( It is not working after making changes to authentication xml file session init block creation as explained by oracle (Bug No14372679 : which they claim it is fixed in 1.7 version  Ref No :Bug 14372679 : REQUEST VARIABLE NOT OVERRIDING SESSION VARIABLE RUNNING THRU A GO URL )
    Please provide step by step solution.No vague answers.
    I followed below steps mentioned.
    RPD:
    ****-> Created a session variable called STATUS
    -> Create Session Init block called Init_Status with SQL
        select 'ACTIVE' from dual;
    -> Assigned the session variable STATUS to Init block Init_Status
    authenticationschemas.xml:
    Added
    <RequestVariable source="url" type="informational"
    nameInSource="RE_CODE" biVariableName="NQ_SESSION.STATUS"/>
    Report
    Edit column "Contract Status" and added session variable as
    VALUEOF(NQ_SESSION.STATUS)
    URL:
    http://localhost:9704/analytics/saw.dll?PortalGo&Action=prompt&path=%2Fshared%2FQAV%2FTest_Report_By%20Contract%20Status&RE_CODE='EXPIRED'
    Issue:
    When  I run the URL above with parameter EXPIRED, the report still shows for  ACTIVE only. The URL is not making any difference with report.
    Report is picking the default value from RPD session variable init query.
    could you please let me know if I am missing something.

    Hi,
    Check those links might help you.
    Integrating Oracle OBIEE Content using GO URL
    How to set session variables using url variables | OBIEE Blog
    OBIEE 10G - How to set a request/session variable using the Saw Url (Go/Dashboard) | GerardNico.com (BI, OBIEE, O…
    Thanks,
    Satya

  • What is the best method to store session variables

    As the title says, what is the best method to store session
    variables in a Production environment?
    I have been reading the posts on sessions and have been
    getting different ideas on where to store session variables, in a
    db, registery, cookies etc etc
    Can someone clarify possible best practice on this matter?
    Matrix

    From my experience, db is the best to store client variable
    data. Registry will cause you trouble in future (when data gets
    overloaded) and cookies will not serve the purpose for a few % of
    your users.

  • How to store jython variable to java bean shell variable

    Hello experts.
    I have one procedure. here is the details
    1st step is with java bean shell techonolgy and one variable.
    <@
    String testv=" ";
    @>
    Second step is jython technology.
    str3='storing some value as per my logic'
    <@testv@>=str3 // here I am getting error because i want to store jython variable to java bean shell variable
    Once it will be stored , I will use in query as SELECT '<@=testv@>' from dual. If this is not possible is there any way to get the jython variable in side refreshing query
    how to achieve this please suggest.
    Thank you.

    Hello experts. Any suggestion on this. How to store jython variable value into java bean shell variable.
    Thank You.

  • How to create session varibales in portal application?

    Hi,
    I want to declare a session varibale in my portal component.
    How do I do it?

    Hi Anagha Bhat,
    There are two types of storage methods.
    1. Volatile - data can be lost when session ends => temporary
    2. Non Volatile - data storage is permanent
    Session Objects as we know are for storing session variables and using them in other Dyn pages
    These methods are Volatile methods
    Please check the below links for 4 different ways to store volatile data
    http://help.sap.com/saphelp_nw70/helpdata/EN/fc/f28f414141a709e10000000a155106/frameset.htm
    http://help.sap.com/saphelp_nw70/helpdata/EN/fc/f28f414141a709e10000000a155106/frameset.htm
    Hope these were helpful.
    Regards,
    Shaila Kasha

  • How to use session variable in JSP function  & How to use both JSP  Servlet

    Hi,
    I am new to JSP and servlets
    Still I am devloping a website in JSP. I am not mixing JSP with servlets, but I do create Java files for bean, logic and database works.
    I try to keep the hard coding part out of JSP.
    I dont how to use both JSP and Servlets in combination.
    Hence If needed I write some functions in JSP.
    but it gives me error
    +<%! public void abc()+
    +{+
    int intUserId = Integer.valueOf((Integer) session.getAttribute("MySession_UserID"));
    +}+
    +%>+
    Saying cannot find symbol session
    1) So can u please tell how can I access session variables within JSP function
    2) And also give me some links/tutorials about useing both JSP and Servlets in combination.
    Thanks
    Venkat

    The application architecture when you use Servlets and JSP in a standard MVC pattern is explained here (under the heading "Integrating Servlets and JSP Pages") and here ...

  • Struts-JSP : how to use session variable?

    Hi,
    i'm new to both struts and JSP and have a doubt here -
    I'm creating a web application in which a user logs in.
    I need to access this user's userid (id name with which he logs in) in my action classes. how can i do this ?
    please help !
    Thanks in advance,
    susen

    // set session variable
    session.setAttribute("value","hello world");
    // retrieve session variable
    HttpSession session = request.getSession(false);
    String variable = (String) session.getAttribute("value");
    variable will have "hello world"
    Edited by: abel on May 12, 2008 4:52 AM

  • How to store  double  variable in hash map

    i need to store double variable using hash map, but i cant able to store it
    my jsp coding contains
    double et=24,j=5;
    hm.put("stm",st);
    hm.put("etm",et);
    Generated servlet error
    C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\exam\org\apache\jsp\availability_jsp.java:752:
    put(java.lang.Object,java.lang.Object) in java.util.Map cannot be applied to (java.lang.String,double)
    hm.put("stm",st);
    ^
    how to overcome this problem
    thank u in advance

    double etme;
    etme = hm.getDouble("etm");
    i'm getting this error
    C:\Program Files\Apache Software Foundation\Tomcat 5.0\work\Catalina\localhost\exam\org\apache\jsp\editdel_jsp.java:85: cannot resolve symbol
    symbol : method getDouble (java.lang.String)
    location: interface java.util.Map
    etme = hm.getDouble("etm");
    ^
    how to solve it
    plz help me

  • How to retrieve sessions variables in JSP

    hi,
    I am trying to retrieve session variable from servlet to JSP.
    In the servlet i am retrieving employeenames from database and storing them in a ArrayList variable then i am setting this variable into the session.
    When retrieving the session in the jsp it displays as [empname1, empname2].
    Please help how to retrieve them
    Thanks in Advance,
    sha

    At the servlet:
    ArrayList<String> employeeNames = new ArrayList<String>();
    employeenames.add(blahBlahblah);
    session.setAttribute("eNames", employeeNames);
    At the JSP:
    ArrayList<String> names = (ArrayList<String>) session.getAttribute("eNames");
    for (String nom : names) {
    do something with the name stored in String variable nom...
    }

  • How to a session variable in another initialisation block?

    Hello all,
    I think I overlook something. So hope someone please can help me out.
    I have 2 initialisation blocks.
    The first one has as a source a LDAP server.
    Now I fill a session variable called mail by the LDAP server.
    When I click on test I will see my mail address.
    lets say I see [email protected]
    No I want to do something with that subdomain.
    So I made a new initialisation block with the database as the source.
    And made a query
    select case when upper(:mail) like 'subdomain%' then A else 'NO Domain found' END from dual
    but this doesn't work, and really don't understand why!! (and ofcourse I am using the executed precendence option to initialise first the other initaialisation block)
    also when I change the query in:
    select case when upper('[email protected]') like 'SUBDOMAIN%' then A else 'NO Domain found' END from dual
    then it al works fine..
    Hope anyone can help me out!!
    Best regards,
    Remc0

    Does the Init Block really fails? Could you please set the logging level to 2 in that user and review both the NQuery and Presentation Services log files? Can you try with a simply select statement:
    SELECT upper(VALUEOF(NQ_SESSION.MAIL)) FROM DUAL
    to make sure the new variable is getting initialized? It could be that the value from the LDAP server has trailing or leading spaces?
    Also I don't see why you need to put the domain on another session variable, you could do your filter using the case statement directly. Unknown to many a CASE statement can be used in a WHERE clause as well. Sample SQL:
    WHERE COLUMN = (case when upper(VALUEOF(NQ_SESSION.MAIL)) like '%SUBDOMAINY%' then 'SUBDOMAINY' else 'NO Domain found' END)

  • How to use session variables in initialization blocks

    Hello,
    I want to use a session variable in a initialization block. Here is what I was doing to see this working
    I created a init block called name_parameter and associated with a variable target named name_parameter_v. The init string for this block is "select 'Hello' from dual".
    i created another init block name_parameter2 and associated with a variable target named name_parameter2_v. The init string is "select :name_parameter_v from dual".
    I have selected name_parameter in the edit execution precedence for name_parameter2.
    The result set is empty. Could you please explain why I am not able to see Hello when i test name_parameter2.
    Thanks.

    to obtain the value contained in a session variable this is the syntax.
    select 'VALUEOF(NQ_SESSION.VARIABLE_NAME)' from dual
    mind the single quotes, they are necessary

  • How to get session variable value in conditional formatting

    I am trying to format my column according to value of a session variable. Normally when comparing to a static value I select value from add button and write the value. What I want is to be able to do this using a session variable. I select variable presentation and as the variable expression I tried MYDAY, NQ_SESSION.MYDAY, VALUEOF(NQ_SESSION.MYDAY), VALUEOF(MYDAY) but nothing works. By the way it is a date value, I don't know it makes any difference
    Any help would be appriciated

    I am surprised that it is not possible to select a session variable when you want to use conditional formatting. Apparently you can only base conditional formatting on presentation variable or values within a column.
    As a workaround you can create an extra column in your request and use a CASE WHEN statement, where you compare the value of the date with the session variable. Then you can base your conditional formatting on that column.
    Regards,
    Stijn
    Message was edited by:
    Stijn Gabriels

Maybe you are looking for

  • An uneventful year... (aka no events for photos taken in 2006)

    Have just installed iPhoto 08 and it has upgraded my library and created events for me. However, no photos from between March 21 2005 and February 1 2007 show up in the Events or Photos views at all! I can see these photos in their albums but there i

  • Idoc in an inbound to enable multiple entries through inbound function modu

    hi all, its urgent please , i have an idoc in mm which have to allow multiple line items throgh miro transaction but it is allowing single line items. if u do it manually it will allow multiple line  for same invoce and purchase order . please tell m

  • Bulk add Contacts to address book

    I have a bunch of contact information in an excel file I would like to add these contact to my address book.  I have tried to save the excel file as a csv and also a tab delimited file so I could import it, but address book would not read the files (

  • 16 Bit and 32 bit program

    What is the difference between a 16 bit program and a 32 bit program? Plus, is there a 64 bit program. Thanks

  • HT4623 ios 7 install on my iphone 4s failed.

    Tried the ios7 install and now I have a dead phone with a cable icon pointing accusingley at an iTunes icon.  Anybody know how to get my phone to even turn on now?  <Edited by Host>