Accessing the session attributes in targeting rules

Hello,
Can I somehow access to the session during the creating of targeting rules? For example, if an attribute that should be used in the rule is stored in session? Any suggestions will be highly appreciated.
Thanks,
Yury.

Define a session scoped component and define all you session attributes as properties to that component.
Now you can expose that component a trageting source which will enable that component to be shown in targeting rule.
This is done by defining /atg/targeting/TargetingSourceMap.sourceMap as:
sourceMap+=MyComp=/MyCompPath
Refer "Setting Up a TargetingSourceMap Service" section of Personalization Programming guide for detail

Similar Messages

  • What is the best way or best practise to access the session scoped component in servelt pipeline?

    Hi Experts,
    What is the best way or best practise to access the session scoped component in servelt pipeline?
    Please share your thoughts.
    Thanks,
    ankV

    To resolve components in the session scope you should be using DynamoHttpServletRequest.resolveName(). And of course the DynamoHttpServletRequest can also be used to resolve global and request scoped components so it is pretty handy to use. You can get the DynamoHttpServletRequest request associated with the current thread from ServletUtil.getCurrentRequest().
    You can also reference a session scoped component from another session (or request) scoped component's property file. E.g. to access profile component (which is session scoped) from your custom session scoped component you would typically do this:
    $class=com.company.MyCustomComponent
    $scope=session
    profile=/atg/userprofiling/Profile

  • Can we access the session scoped variable by simply using its name

    The Java EE 6 Tutorial contains a "Duke's Bookstore Case Study Example”. I could not understand following statements of this case study:
    *bookdetails.xhtml*
    {code}
    <h:outputText value="#{selected.title}"/>
    {code}
    *BookstoreBean.java*
    {code}
    public String details() {
    context()
    .getExternalContext()
    .getSessionMap()
    .put(
    "selected",
    getFeatured());
    return ("bookdetails");
    {code}
    I want to know can we access the session scoped variable in bookdetails.xhtml by simply using its name as done above?

    It is basic Expression Language (EL) functionality, it isn't even specific to JSF. And it isn't specific to the session scope either, you can put beans in any scope (page, request, session, application, flash, conversation, whatever custom scope you create) and reference it using EL by only its name. The thing that you have to take care of is that the bean lives in SOME scope, which can be achieved using JSF specific annotations or configuration files, through CDI or by manually putting the bean in a specific scope through Java code. It's flexible, which is the nature of the Java platform.

  • Access the oparational attribute 'entryUUID' of an ldap entry

    How can I access the oparational attribute 'entryUUID' of an ldap entry? Does someone have a sample code fragment?

    Attributes attribs = initLdapCtx.getAttributes(fullName, new String[]{"+"});
    This is for OpenLDAP only, because it's the only server I know which supports "+" meaning "all Attributes".
    For other Servers you might need to specify the entryUUID Attibute explicitly in the String Array. But be aware that this Attribute might have different Names on different Servers.
    Cheers,
    Peter

  • SUN Access Manager session attributes

    I'm trying to find out which session attributes that are available for a Policy Agent out of the box from Access Manager 7.1
    The AMAgent.properties file has a property:
    com.sun.am.policy.agents.config.session.attribute.map=
    But the question is which attributes you can fetch through this settup.
    I'm only found the property: successURL.
    I would like to get the authentication level and end user IP adress.

    One clarification. AM 6.1 did have session failvoer feature. But it was container dependent. It used container features to provide this. Each container had its on configuration. It was made independent of the containers in AM 6.3 release. I would stonglry recommend using AM 6.3 or above if you are using session failover.
    shivaram

  • Accessing the Session in Toplink Essentials

    I try access session by this way:
    http://ontoplink.blogspot.com/2007/01/accessing-session-in-toplink-essentials.html
    and get exception:
    (Oracle TopLink Essentials - 2.0 (Build b41-beta2 (03/30/2007))): oracle.toplink.essentials.exceptions.ValidationException
    Exception Description: Could not find the session with the name [my_name] in the session.xml file []
    Is session.xml needed for this ? I hope not, because it requires project.xml and it maybe require some another... All what I need is:
    session.getEventManager().addListener(myEventListener);
    to force toplink switch database schema in listener preLogin method. In Hibernate, it can be done by one line in config file.
    Lumir

    OK, I tried obtain session BEFORE creating EntityManagerFactory and EntityManager.
    Now when obtaining it AFTER creating EMF and EM, it works.
    But this not solve problem with change db schema, because AFTER create EMF and EM, session is logged in and EventListener preLogin isn't called.
    Can anyone point me, how to change db schema ? I know it for connection defined using toplink.jdbc.* properties, but not for JNDI:
    public class ToplinkSessionCustomizer implements SessionCustomizer
    public void customize(Session session) throws Exception
              if(jdbcUrl == null)
                   // JDBC URL is not set, assume JNDI lookup
                   JNDIConnector connector = (JNDIConnector) session.getLogin().getConnector();
                   connector.setLookupType(JNDIConnector.STRING_LOOKUP);
                   // 1. Not works, cause NPE
                   // at oracle.toplink.essentials.descriptors.ClassDescriptor.verifyTableQualifiers(ClassDescriptor.java:3518)
                   session.getDatasourcePlatform().setTableQualifier(schema);
                   SessionEventAdapter preLoginEventListener = new SessionEventAdapter()
                   // Listen for preLogin events
                        public void preLogin(SessionEvent event)
                        event.getSession().getLogin().setTableQualifier("myschema");
                   // 2. Not works, eventManager is null, cause NPE !
                   session.getEventManager().addListener(preLoginEventListener);
              else
    // This works OK
                   DatabaseLogin login = session.getLogin();
                   login.useOracleThinJDBCDriver();
                   login.setDatabaseURL(jdbcUrl);
                   login.setUserName(userName);
                   login.setPassword(password);
                   login.setTableQualifier(schema);
         }

  • How can i access the LoaderInfo attributes in FlasCC ?

    I try to access the LoaderInfo::parameters to get given FlashVars.
    But i cant even get the simple String variable 'url' from the LoaderInfo object
    This is my sourcecode:
    #include <stdio.h>
    #include <Flash++.h>
    #include <AS3/AS3.h>
    using namespace AS3::ui;
    int main(int argc, char **argv)
        printf("Hello World\n");
        flash::display::Stage stage = internal::get_Stage();
        flash::display::LoaderInfo info = flash::display::LoaderInfo::getLoaderInfoByDefinition(stage);
        AS3::local::var stringValue = info->url;
         // a second try, which doesn't compile too
         //AS3::local::var stringName  = AS3::local::internal::new_String("url");
         //AS3::local::var stringValue = AS3::local::internal::getproperty(info, stringName);
        char* str = AS3::local::internal::utf8_toString(stringValue);
        if (str)
            printf("cVar=%s\n", str);
            free(str);
        else
            printf("str = null\n");
        return 0;
    and here the error:
    $ PATH=/cygdrive/d/Projects/flasCC/flascc/sdk/usr/bin:$PATH make FLASCC=/cygdri
    ve/d/Projects/flasCC/flascc/sdk FLEX=/cygdrive/d/Projects/flasCC/flex46
    -------- Sample 1 --------
    Now lets compile it as a SWF:
    "/cygdrive/d/Projects/flasCC/flascc/sdk/usr/bin/g++" -Werror -Wno-write-strings
    -Wno-trigraphs hello.cpp -jvmopt="-Xmx3000M" -O4 -emit-swf -swf-size=400x400 -o
    hello.swf -lFlash++ -lAS3++ -L/cygdrive/d/Projects/flasCC/flascc/sdk/usr/lib
    hello.cpp: In function 'int main(int, char**)':
    hello.cpp:50: error: conversion from 'AS3::ui::flash::display::LoaderInfo::inter
    nal::iprop_url' to non-scalar type 'AS3::local::var' requested
    make: *** [T01] Error 1
    Anyone knows how it works ?
    Thanks

    I found a way to get the FlashVars/swf parameters by:
    CModule.rootSprite.stage.loaderInfo.parameters

  • How can I pass the session attributes to other applications?

    I need to pass a value across the web application. Is it possible?
    I use Forward to redirect the page in JPF. Before redirection, I set some attribute/value in session. In new application, I found the atttribute value is null. Is there a way to pass the value between web applications.
    Thanks in advance.

    Hi,
    Two different Webapps doesn't share the same session , they have two different. So as far as i known you have to use something like a db to pass variables or another common way. Maybe when you redirect you can store an atribute to the HttpRequest and get it in your other app.Something very simple is to fix the url like that
    http://www.mydomain.com/manager.jsp?passingAttribute=passingValue
    Hope that helps
    BR

  • Problem to access the object attribute in a code

    Hi guys,
    I need to pass the attribute of a business object to class.Below is the code but its throwing an error 'There is no component ZYBTT in l_bus2000116'.Since the business object conatins the attribute but its throwing an error.Could any one throw some light on the below code -
    data: l_BUS2000116 type swc_object,
          Z_BRF_Function_name TYPE FDT_UUID.
    swc_get_element ac_container 'Z_Quotation' l_BUS2000116.
    swc_get_element ac_container 'Z_BRF_Function_name' Z_BRF_Function_name.
    CALL METHOD ZYCLOTO_AGENTDTMT_BRF=>ZYOTOM_GET_AGENT_IDS_SING_LEV
      EXPORTING
        IM_FUNCTION_ID  = Z_BRF_Function_name
        IM_BTT          = l_BUS2000116-ZYBTT
       IM_COMPL_CAT    =
       IM_COUNTRY_CODE = ZYCOUNTRY
        IM_LEAD_BRAND   = l_BUS2000116-leadbrand
        IM_RISK_LEVEL   = l_BUS2000116-ZYRISKLEVEL
        IM_SALES_ORG    = l_BUS2000116-ZYsalesorg
        IM_TCV          = l_BUS2000116-ZYTCV.
    IMPORTING
       EX_FULL_NAME    =
       EX_RETURN       =

    Hi,
    Is ZYBTT a new attribute? Have you changed the status of the attribute to implemented or released (in SWO1: Edit -> Change release status)?
    And actually I think that your syntax is wrong too (BOR world is different compared to classes). If you want to use an attribute, I think that the syntax should be something like this:
    SWC_GET_PROPERTY <Object> <Attribute> <AttributeValue>.
    Read more here:
    http://help.sap.com/saphelp_nw04/helpdata/en/c5/e4acef453d11d189430000e829fbbd/content.htm
    Regards,
    Karri

  • Accessing session attribute in output jsp page

    Hi i am not getting any output in jsp page...
    i am getting just heading
    i think some problem with Session attribute..
    if so how to access session been in jsp page
    my code is here
    <%@page contentType="text/html"%>
    <%@page pageEncoding="UTF-8"%>
    <%--
    The taglib directive below imports the JSTL library. If you uncomment it,
    you must also add the JSTL library to the project. The Add Library... action
    on Libraries node in Projects view can be used to add the JSTL 1.1 library.
    --%>
    <%--
    <%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
    --%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>Tauvex Search Output</title>
    </head>
    <body>
    Tauvex Search Output
    <table>
    <c:forEach items="${myDataList}" var="myData">
    <tr>
    <td>${myData.Fitsfilename}</td>
    <td>${myData.RA_START}</td>
    <td>${myData.RA_END}</td>
    <td>${myData.DEC_START}</td>
    <td>${myData.DEC_END}</td>
    <td>${myData.telescope}</td>
    <td>${myData.STARTOBS}</td>
    <td>${myData.ENDOBS}</td>
    <td>${myData.FILTER}</td>
    </tr>
    </c:forEach>
    </table>
    <%--
    This example uses JSTL, uncomment the taglib directive above.
    To test, display the page like this: index.jsp?sayHello=true&name=Murphy
    --%>
    <%--
    <c:if test="${param.sayHello}">
    <!-- Let's welcome the user ${param.name} -->
    Hello ${param.name}!
    </c:if>
    --%>
    </body>
    </html>
    plz reply soon
    thanks a lot

    this is what i set in servlet
    request.setAttribute("myDataList", myDataList);
    request.getRequestDispatcher("someJspFile.jsp").forward(request, response);
    how can i access that session attribute in jsp

  • Accessing the attributes of a class using field symbols?

    An option to pulll a variable into a user exit that otherwise would be out of reach is detailed [here|https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/208811b0-00b2-2910-c5ac-dd2c7c50c8e8]
    Can a similar approach involving field symbols or otherwise, be used to pull in the attributes of a class into the exit? For now, I'm trying to access the A_FRONTEND_INDEX attribute of the class CL_HRXSS_REM.
    any ideas?
    ~Suresh

    Hi,
    Have you already tried (PROGRAM)(OBJECT)->A_FRONTEND_INDEX in your code? I prepared small testing scenario with two programs and it works.
    REPORT  zmv_test1.
    FORM test.
      FIELD-SYMBOLS: <fs> TYPE ANY.
      ASSIGN '(ZMV_TEST2)zip->crc32_map' TO <fs>.
      IF sy-subrc EQ 0.
        <fs> = 'Test'.
      ENDIF.
    ENDFORM.                    "test
    REPORT  zmv_test2.
    DATA: zip TYPE REF TO cl_abap_zip.
    START-OF-SELECTION.
      CREATE OBJECT zip.
      PERFORM test IN PROGRAM zmv_test1.
    Cheers,

  • Accessing the browser session from a Web Start application.

    I am redeploying my applets as applications (JFrame) in the Web Start architecture. Is there a way for these applications to access the browser session that they were opened from? This was provided for me when I was opening my applets in a browser popup window (window.open()).

    To access the session, pass the session id in the jnlp file (this is assuming your jnlp file is generated dynamically by a servlet).
    Create another servlet to return whatever objects you want from the server session (call this servlet RetObject, lets say).
    When you access RetObject using a URLConnection, append ;jsessionid=<sessionid> to the servlet url
    e.g.,
    http://server/RetObject;jsessionid=hjh232323232jhkjh
    (for websphere, this variable may be csessionid. jsessionid works on weblogic and on tomcat).
    Use ObjectInputStream to receive objects from the servlet.
    -Rahul

  • How to access the attributes from a method

    Hi,
    Thanks to all who replied to my previous thread. Please let me know how to access the attributes in method of component controller in the view.
    Let Component_method be my method in component controller which contrains few attributes like this
    method component_method.
    data : node1 type ref to if_wd_context_node,
            itab type standard type of mara.
    endmethod.
    I want to access the above attributes in method of view.
    method view1.
    wd_comp_controller->method_component( ).
    ????? how to access the data of the method_component?
    endmethod.
    Kindly help me out in the syntax.
    Rgrds
    Mahathi

    Hi mahathi
    You should define the parameters in the header, not in the body of the method:
    You can define it as importing, exporting, changing or returning, as you need. For example, in SE80
    Parameter             Cl.declar.          RefTo        Opt        Type ref
    node1                    importing            X                          if_wd_context_node
    itab                       exporting                                        mara
    method_component().
    " code here...
    endmethod.
    and when you have to call the method,
    wd_comp_controller->method_component(
                    EXPORTING     node1 = nodelocal   " not importing!!!
                    IMPORTING      itab   = itablocal      " not exporting!!!
    i think that it's this what you want, don't i?

  • Is session attribute thread-safe?

    If i visit the same web application across two browser windows simultaneity, there will be two threads visiting the web application.
    But i don't know whether the two threads share the same session?
    If they share, the session attribute is not thread-safe.
    If they do not share, the session attribute is thread-safe.
    who can explain it to me? Thanks a lot!

    it depends
    we may think that there can be only one request to the session from the one user so the session would be thread safe,However if the user have multiple request (i.e opens more than one browser ), all the request belong to the same session and all threads processing these requests will be able to access the session simultaneously.
    to solve this problem we use a synchronized blok to process the session so it will be thread safe from multiple requests from the same user

  • How can we reset the session data in SAP ISA B2B application.

    com.sap.isa.isacore.action.IsaCoreInitAction$StartupParameter this action class providing the special feature to store all data passed to it in the request as parameters into the session context and make them available for all other actions.
    1. But in the inner class they had defined private parametrized constructor.
    2. Action class is defined as final.(there is no chance to override the method)
    3. There is no setter method (only getter() is available).
    4. Creating a new Z_ class that is reflecting in entire application.
    5.They had hard coded the Session attribute name in Action class.
    6. Application is expecting a session object with the same attributes.
    Is there any chance to create a new object for this class or any where any chance to reset the session data. Am using the Multiple_SoldTO concept in my application. My back end ECC .Please help me.
    Advanced Thanks
    PC.M
    Edited by: pmudigonda on Jul 6, 2011 1:21 PM

    I am not sure about your requirement, but yet.. Did you check UserSessionData object? It encompasses all the session variables.

Maybe you are looking for

  • Issue in transfer posting

    Dear All, In my client side  there is a issue that  for few materials like oil ,container is of 190 L, but sometimes it happens like, actually container can contain less or more than 190 L which production people knows during consumption  to process

  • My daughter purchased an app she thought it was a move how do I get a credit back so she can purchase the move she was looking for

    I need to get a credit my daughter purchased what she thought was a move. Instead it was a book    I would like to get a credit so she can purchase the movie

  • Screen Painter don't work

    Screen Painter don't work when I click menu "Tools/Screen Painter", and show a System Message :Add-on Screen Painter is disconnected.Please contact:www.sap.com Restart Add-on Log off the current company Continue working without this Add-on. What shou

  • Delivery note in BAPI_GOODSMVT_CREATE

    I'm trying to do GR with purchase order using BAPI_GOODSMVT_CREATE, I need to fill in delivery note (I can fill in using MB01), however I can't find any field for delivery note in BAPI_GOODSMVT_CREATE, anybody knows which field need to fill in? or an

  • Remove / Hide Not Assigned Characteristics / KF

    Hi Gurus, I have a report and in there report, I have rows with Not Assigned. My users do not wish to see these rows. Even thought Not Assigned, these rows/columns have values so i cannot use Suppress Zero values. Is there any way or hiding or removi