Session in ATG

Hi,
  For what functionality session is used in ATG, i.e what is the use of session in ATG. and how is it achieved in ATG????
Components : session scoped
Repository : Transient properties  
Session cookies: ????
Regards

Repository transient properties are session scoped . the values stored in Transient Properties are available only till a particular session exists. Once the session has expired all the transient properties values will be gone.
When and why are transient properties should be used.???
Why cant we use HttpSession session=session = request.getSession(true); instead of transient properties????
By default the transient property values are not stored in session but stored in the repository item level caches. Even if you disable the caching for an item, ATG internally caches its property values during a transaction.
We access repository properties through RepositoryItem object instances and for any given item-descriptor in a repository there can be many RepositoryItem objects each having its own state (property values). So same property (transient or persistent) can have same or different value as the RepositoryItem object instance is going to be different. Now imagine if a transient property value was stored in session then how it would handle the different values for a given transient property for different items within a same session unless that property holds something session specific.
Having said this you must also know that there are couple of custom property descriptor classes provided OOTB: atg.repository.SessionPropertyDescriptor and atg.repository.SessionEnumPropertyDescriptor each of which uses HttpSession to store property values. So if your transient property is declared with the property-type attribute specifying any of these custom property descriptor classes then only that property value would be stored as a session attribute. Also note that you would have to pass the session attribute name from your repository definition something like below:
<item-descriptor name="myItem" ...>
  <property name="myProperty" data-type="string" property-type="atg.repository.SessionPropertyDescriptor" ...>
    <attribute name="sessionAttributeName" value="myProp"/>
  </property>
</item-descriptor>
I don't remember exactly from which version but SessionPropertyDescriptor has now been deprecated so if you plan to use it you have to do it at your own risk. The other class SessionEnumPropertyDescriptor can be used only for enumerated proeprties and is used in the securityStatus property of user profile. Refer this
Oracle ATG Web Commerce - Security Status
Does cookie play a role in ATG for maintaining session.   Profile and Order data is stored in cookies right???
Whenever a request comes in without a session-id in the cookie or in the URL, the application server would create a new session for the particular web-app that is being requested. And like any typical web-app ATG also uses cookies to recognize a returning user. ATG uses cookies for different scenarios like identifying anonymous users on subsequent visits, auto-login for registered users, if a user is automatically logged in and if there were any items in his cart in the previous visit then load them back to the current cart etc. Of course there some configuration changes required to get these scenarios working in ATG.
Remember cookies can be blocked or deleted by the user so why would you store any important data in them? Cookies store a small piece of information (usually an id) which browser can send to the server with every request and they do not hold any explicit profile or order data.
Hope it helps and clarifies your concerns.

Similar Messages

  • How to create session and end the session in atg without using ootb

    can anyone send the code for creating session(Login) and ending(Logout) session in atg without using ootb.
    thankyou!

    It is plain simple and is plain old request.getSession(false) and then invalidate the session , but why do you want to do it separately . ATG works behind scenes to associate lot of attributes to the session when log in happens and then deassociates them when log out happens , SessionManager component is also helpful in security , can you state why exactly would you want to do it?

  • Resolving session scoped component in global scope component.

    Hi,
    I am implementing batch process and i am need to resolve session scoped component in global scoped component.
    In global scope component (one of the component referred by my scheduler which also in global scope as usual) and i need to resolve session scoped "/atg/epub/workflow/WorkflowView" component in my scheduler.
    I tried all possibilities but nothing worked out. I do not have access to current request, because its batch process. following ways i tried,
    1. getResolveName("/atg/epub/workflow/WorkflowView") method of GenericService which is extended by my global scope component -- This returns null.
    2. Tried to get the current request on ServletUtils to use resolveName() method on request.
    ServletUtlis.getCurrentRequest() - This returns null as expected.
    Is there any way to resolve session scoped component in global scope component. Thanks in advance.
    Edited by: 938890 on Jun 30, 2012 4:59 AM

    Try below :
    If you want to resolve the name of a Nucleus component from Java code that is not itself a Nucleus service, you must first initialize Nucleus with this construct:
    Nucleus.getGlobalNucleus().resolveName("target component")
    where target component is the name of the component you are looking up. Note that this construct works only for components with global scope.
    You can also resolve names of Nucleus components using the Java Naming and Directory Interface (JNDI). The following example shows how you can use JNDI to access the Scheduler component:
    String jndiName = "dynamo:/atg/dynamo/service/Scheduler";
    Context ctx = new javax.naming.InitialContext ();
    Scheduler s = (Scheduler) ctx.lookup (jndiName);
    reference - oracle ATG docs.
    ~ Praveer

  • ATG and Browser Cookies

    Hi All,
      Wanted to know what are all the information stored in browser cookie and session.??? When talking about session in ATG, is it related to browser session/httpSesssion/session scoped component???/
    Is the whole Order object is stored in the cookie or just the Order id???
    Regards

    By default ATG will store the sessionId and userPrefLanguage in cookies. If you enable cookie based authentication then ATG will store user profile id also in the cookies.
    When talking about session in ATG, is it related to browser session/httpSesssion/session scoped component???/
    Life time of HTTPSession and Session Scoped components will be a particular browser session. Once you exit the browser, the session will be terminated.
    Is the whole Order object is stored in the cookie or just the Order id???
    No information related to order is stored in cookies, in a cookie based authentication, profile id will be available in the cookie and the order will be fetched using profile id.
    Cheers
    R

  • 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

  • Session timeout event in ATG

    Hi,
    We have a requirement to send out an email to the user when his session times out while on shopping cart page.
    Is there a way in ATG to trap the session timeout event and write our logic when it occurs?
    Please advise.

    If you want to email only on shopping cart page, then in the pipeline save the user timeout details only for the pages you are interested in ( like shopping cart page).
    And also maintaining additional field requesturi is also good.
    Session timeout can be found if max_interval_time-last_accessed_time>0 for a particular user.
    So scheduler can check for the condition and send email to the user.
    Peace
    Shaik

  • Launching a Preview Session Outside the ATG Business Control Center

    I have setup a remote preview server on ATG 10.1.1. Everything works great when viewing it inside the BCC however I’m wondering how to access the preview server outside the BCC. According to the ATG documentation, it sounds like that’s possible. The ATG docs state:
    “Users can preview project asset changes outside the framework of the Business Control Center. For example, you might want employees or outside reviewers who do not have access to the Business Control Center to evaluate changes to a Web application while it undergoes development. In this case, you can enable preview on servers that do not have the Business Control Center installed, then give reviewers URLs to the launch pages on these servers. They can invoke these URLs from any browser window.
    Note: Users who are not logged into the Business Control Center can invoke preview sessions only with URLs to a server where the Business Control Center is not running. In order to avoid security breaches, URLs to preview sessions on the Business Control Center server are blocked.”
    This is the only information I found in the documentation that talks about viewing preview outside the BCC. Based on this limited information, there are a lot of questions I have about how this actually works.
    1. Any attempt to hit any page on my remote preview server outside the BCC, I see the following exception:
    “ERROR [PreviewProfileRequestProcessor] An attempt was made to preview a project without logging in as a user with access to publishing assets. If you are running a local preview instance, the preview URLs registered with the PreviewURLManager may be misconfigured. Ensure that the preview URLs are configured with the same host and domain name used to access the BCC server. This preview request URL is: http://localhost:8280/sample_catalog/index.jsp. If you are running a remote preview instance, the Preview feature does not support remote preview on servers running the BCC. Ensure that the remote preview instance is not running any of the BCC related modules. If you received this error and did not try to perform a remote preview, then you may need to disable preview in the current web application by setting the atg.preview context parameter to false in the webapps web.xml file.”
    I am not running the BCC on this instance so I’m not sure why I am seeing this. Is there something configuration I'm missing here?
    2. I don’t understand where these urls would come from that a reviewer would use to preview the application. There is no "remote preview url" when previewing a page from within the BCC to copy and send to a reviewer so how would a BCC user send a url to a reviewer?
    3. Assuming the reviewing knew which page to hit in the remote preview server, how would that page use the assets from a project? Should the project id of the project be include as a param to the url?
    - Michael

    Shaik, if only it was that simple :( Do you have much experience working with remote preview or are you just guessing here like I have been? In order to help clarify my post though, here is the scenario that describes the basis for my questions:
    A business user is working on a project within Merchandising of the BCC
    1.     The user makes a change to a category
    2.     The user clicks the Preview Button on the tool bar
    3.     The system displays the Preview launcher screen
    4.     The user selects a pre-configured profile user and page for the preview session
    5.     The user clicks the Flexed based launch button
    6.     The application displays within the context of the BCC browser/tab
    7.     The business user would like to send that url to a reviewer who does not have access to login to the BCC
    What happens from step 6 is that a giant iframe launches from within the context of the BCC browser/tab. If you are using remote preview, it is still an iframe and still displays within the context of the BCC browser/tab, the only difference is that the BCC is proxying information to the preview instance in order to initialize the preview session to display the application in the context of the business user’s project. The url the user sees in the browser is the url for the BCC, not the remote preview server. Because the UI for Merchandising and Preview is built using Flex, there is no way to click on the Preview button to open it up in another tab or browser. The only way your suggestion would work is if there is a way to configure the Flex UI to have it open up preview in a new browser/tab which I doubt is possible.
    I hope this helps better explain my post. With that said though, this brings me back to my original questions.

  • Any session scope form handler out of the box in atg commerce

    Is there any session scope form handler out of the box in atg commerce. Let me know if anyone is aware of such form handler.
    Thanks,
    Santosh

    Search based formhandlers are some that come to my mind
    CategorySearch (/atg/commerce/catalog/CategorySearch (DCS))
    CatalogSearch(/atg/commerce/catalog/CatalogSearch (DCS))
    ProductSearch(/atg/commerce/catalog/ProductSearch ((DCS))
    Incidentally i think all of them point to SearchFormHandler
    Few others i can this of are
    GiftListFormHandler
    CompareSkusFormHandler (deprecated i guess)
    CatalogSearchFormHandler (Extension of SearchFormHandler class)
    There could be many more , updates / additions will be nice
    adding
    AdvProductSearch
    ProductTextSearch
    Edited by: Sundar on Dec 4, 2012 3:42 AM

  • What are Session Components in ATG OOTB

    Hi,
    What are the Session components in ATG OOTB, as far i know Profile and ShoppingCart are the Session components.
    Please mention if any other Session components are there. we need to create the same using other framework.

    There are a lot of session scoped components. Here are just the ones found in the DAS,DPS,DSS and DCS modules
    DAS
    ===
    ./config/config/atg/dynamo/admin/context/SessionAdminContextHolder.properties:$scope=session
    ./config/config/atg/dynamo/admin/CreateWebServiceProperties.properties:$scope=session
    ./config/config/atg/dynamo/security/FormLoginSession.properties:$scope=session
    ./config/config/atg/dynamo/security/IdentityManager.properties:$scope=session
    ./config/config/atg/dynamo/security/User.properties:$scope=session
    ./config/config/atg/dynamo/security/UserFailService.properties:$scope=session
    ./config/config/atg/dynamo/service/fluoroscope/listener/SessionCachingListener.properties:$scope=session
    ./config/config/atg/dynamo/service/fluoroscope/SensorSessionData.properties:$scope=session
    ./config/config/atg/dynamo/service/transfer/xls/AssetXLSFileImportOperation.properties:$scope=session
    ./config/config/atg/dynamo/servlet/RequestLocale.properties:$scope=session
    ./config/config/atg/dynamo/servlet/sessiontracking/GlobalSessionEnumPropertyValues.properties:$scope=session
    ./config/config/atg/dynamo/servlet/sessiontracking/SessionSaver.properties:$scope=session
    ./config/config/atg/dynamo/servlet/windowscope/WindowScopeContextStorage.properties:$scope=session
    ./config/config/atg/multisite/RealmSessionTracker.properties:$scope=session
    ./config/config/atg/multisite/SiteSessionManager.properties:$scope=session
    ./config/config/atg/repository/SessionPropertyDescriptorData.properties:$scope=session
    ./config/config/atg/servlet/http/CookieBuffer.properties:$scope=session
    ./config/config/SessionConfirmationNumberHolder.properties:$scope=session
    DPS
    ===
    ./config/targeting/atg/devtools/RepositoryAgent.properties:$scope=session
    ./config/targeting/atg/devtools/SensorAgent.properties:$scope=session
    ./config/targeting/atg/devtools/TargeterAgent.properties:$scope=session
    ./config/targeting/atg/targeting/ConflictFilter.properties:$scope=session
    ./config/userprofiling/atg/devtools/UserDirectoryAgent.properties:$scope=session
    ./config/userprofiling/atg/dynamo/droplet/PasswordExpiresSoon.properties:$scope=session
    ./config/userprofiling/atg/dynamo/security/IdentityManager.properties:$scope=session
    ./config/userprofiling/atg/reporting/datacollection/userprofiling/SiteVisitRequest.properties:$scope=session
    ./config/userprofiling/atg/userprofiling/Profile.properties:$scope=session
    ./config/userprofiling/atg/userprofiling/ProfileFailService.properties:$scope=session
    ./config/userprofiling/atg/userprofiling/sso/Passport.properties:$scope=session
    DSS
    ===
    ./config/atg/devtools/ScenarioAgent.properties:$scope=session
    DCS
    ===
    ./config/atg/commerce/catalog/AdvProductSearch.properties:$scope=session
    ./config/atg/commerce/catalog/CatalogNavHistory.properties:$scope=session
    ./config/atg/commerce/catalog/CatalogSearch.properties:$scope=session
    ./config/atg/commerce/catalog/CategorySearch.properties:$scope=session
    ./config/atg/commerce/catalog/CompareSkusFormHandler.properties:$scope=session
    ./config/atg/commerce/catalog/comparison/ProductList.properties:$scope=session
    ./config/atg/commerce/catalog/comparison/TableInfo.properties:$scope=session
    ./config/atg/commerce/catalog/ProductSearch.properties:$scope=session
    ./config/atg/commerce/catalog/ProductTextSearch.properties:$scope=session
    ./config/atg/commerce/gifts/GiftlistFormHandler.properties:$scope=session
    ./config/atg/commerce/gifts/GiftlistSearch.properties:$scope=session
    ./config/atg/commerce/order/purchase/CostCenterContainerService.properties:$scope=session
    ./config/atg/commerce/order/purchase/PaymentGroupContainerService.properties:$scope=session
    ./config/atg/commerce/order/purchase/PurchaseProcessConfiguration.properties:$scope=session
    ./config/atg/commerce/order/purchase/ShippingGroupContainerService.properties:$scope=session
    ./config/atg/commerce/order/scheduled/ScheduledOrderFormHandler.properties:$scope=session
    ./config/atg/commerce/order/ShoppingCartModifierConfiguration.properties:$scope=session
    ./config/atg/commerce/pricing/CleanBeforePricingSlot.properties:$scope=session
    ./config/atg/commerce/pricing/NoCleanBeforePricingSlot.properties:$scope=session
    ./config/atg/commerce/pricing/UserPricingModels.properties:$scope=session
    ./config/atg/commerce/promotion/PromotionAnalysisModelHolder.properties:$scope=session
    ./config/atg/commerce/ShoppingCart.properties:$scope=session
    ./config/atg/commerce/util/RepeatingRequestMonitor.properties:$scope=session
    ./config/atg/devtools/CommerceAgent.properties:$scope=session
    ./config/atg/registry/Slots/RelatedItemsOfCart.properties:$scope=session
    ./config/atg/userprofiling/ProfileFailService.properties:$scope=session

  • Session Handling in ATG

    Friend,
    Could you please provide any best document about session handling in ATG.
    Thanks in advance

    You can refer these:
    http://docs.oracle.com/cd/E35318_02/Platform.10-1-1/ATGInstallGuide/html/s0710sessionmanagementinoracleatgwebc01.html
    http://docs.oracle.com/cd/E35318_02/Platform.10-1-1/ATGInstallGuide/html/s0814enablingcomponentbackup01.html
    https://docs.google.com/file/d/0B8rpgofYlaJnYTBiNGNmNjMtODU0MS00NDNmLThmOWItNGQzN2UwODBjODRi/edit?pli=1

  • ATG Session Management for multiple instance

    Hello,
    I have a topology for ATG applicaiton on my local as one web server with two instances of ATG running. I am storing the cart details in a cookie however, the issue I am facing is that when I restart the browser [close and open again] sometimes I see the items in my cart and at times my cart is empty [Depending on what instance the request was served from]. The req I am working towards is to have items every time I do the routine mentioned above.
    Also, When I changed the architecture to one web server and one instance, my cart populates just fine.
    This is for anonymous user; no I am not persisting anonymous user profile/order details. Cart Info is stored in a secure cookie.
    ATG9_1 Jboss4

    tnx Ram..
    but problem tht i mentioned is happening at my client site. In my office i dont get that problem. Why such discrepancy dint know......
    Infact it want my application in such a way that when i logged in to my application using seperate set of user id and password from two new
    instance of IE 6.0 browser (Not through CTRL+N), logging out my
    application from one IE browser by clicking Log Out button should not logged me out from othe instance.
    When i printed session value when logged from two new instance, i found that both are taking same value at client site where as in my office set-up they both take different values (which is wht i wanted). Set-up and everything are same at both the end. So why such different behaviour at both end. Iplanrt versions are same at both place.
    As mentioned by you i have not incorporated session.setMaxInactiveInterval(-1); in my code. Infact the sesson time out is default to webserver (ie 30 mins).
    Tnx,
    Sachin

  • How to handle session expiration in ATG

    Hi,
    We have a requirement wherein we have to redirect the user to a specific jsp when his session is expired. For example if a guest user is in cart page and is idle for more than 30 min he should be redirected to session expired page. We are using Apache web server and Jboss app server. Following are the ways i tried
    1. In Apache/conf/extra/httpd-vhosts.conf, I have set ErrorDocument 409 to session expired jsp - This is failed because jsp is not a static content and only static contents will be present in webserver. If it would have been a simple html (static) then this method would have worked fine I believe.
    2. In cart page I have set the sessionExpirationURL of cartformhandler to appropriate jsp, checkForValidSession to true, CheckSessionExpiration.expirationURL to same session expired jsp. I am not sure why this is not working.
    Please let me know the best way to handle this situation. Any suggestions would be appreciated.
    Regards,
    Avinash

    When user clicks any link on your page after session expired then you can redirect him to login page through your formhandler if a handleX() method was invoked by the request or you can use a filter which can check for something like profile.isTransient(). You can then redirect to the login page from your filter keeping a parameter of the original url to be used as login success url so that after login you can again redirect to the page that user originally intended to see.
    For detecting user idleness in browser, here is one of the possible approach using javascript by implementing a document level keyboard/mouse listener to detect user interaction in your page:
    <script type="text/javascript">
        var t;
        window.onload = resetTimer;
        document.onmousemove = resetTimer;
        document.onkeypress = resetTimer;
        function handleIdleTimedOut() {
            //alert("You are now logged out.");
            window.location.href = 'logout.jsp';
        function resetTimer() {
            clearTimeout(t);
            var timeoutPeriod = 1000 * 60 * 5;  //5 minutes       
            t = setTimeout(handleIdleTimedOut, timeoutPeriod);
    </script>Apart from this, you may also want to take a look at reverse ajax to send the timed out kind of notification to the browser with the help of a HttpSessionListener:
    http://directwebremoting.org/dwr/documentation/reverse-ajax/index.html
    Hope this helps.
    Edited by: Nitin Khare on Aug 23, 2012 12:15 AM

  • Error while bringing up ATG REST Webservice

    Hi,
    I am trying to bring a REST Webservice using ATG 9.3 version.I am getting the below errors in the startup of the instance.I have added "REST" module in the Manifest file and am able to see the entry " C:\ATG\ATG9.3\REST\config\config.jar" in CONFIGPATH(Please let me know if there are other ways to find if the service has come up properly).I am trying to connect to the server using JAVA based REST Client as given below.Also,i have placed the jar files in the CLASSPATH of the module.I am hoping that the webservice have not come up properly because of these startup errors.Please help me out to resolve this issue.
    STARTUP EXCEPTION SEEN IN SERVER
    ========================
    2012-06-25 06:20:36,815 INFO [STDOUT] Unable to create class atg.rest.servlet.HeadRestServlet for configuration /atg/dynamo/servlet/dafpipeline/HeadRestServlet java.lang.ClassNotFoundException: No ClassLoaders found for: atg.rest.servlet.HeadRestServlet
    2012-06-25 06:21:56,325 INFO [nucleusNamespace.atg.userprofiling.sso.PassportAuthorityService] Starting passport authority service
    2012-06-25 06:21:56,460 INFO [STDOUT] **** Error
    2012-06-25 06:21:56,460 INFO [STDOUT]      
    2012-06-25 06:21:56,460 INFO [STDOUT] Mon Jun 25 06:21:56 EDT 2012
    2012-06-25 06:21:56,460 INFO [STDOUT]      
    2012-06-25 06:21:56,460 INFO [STDOUT] 1340619716460
    2012-06-25 06:21:56,460 INFO [STDOUT]      
    2012-06-25 06:21:56,460 INFO [STDOUT] /
    2012-06-25 06:21:56,460 INFO [STDOUT]      
    2012-06-25 06:21:56,460 INFO [STDOUT] Unable to set configured property "/atg/dynamo/servlet/Initial.initialServices" atg.nucleus.ConfigurationException: Unable to resolve component /atg/dynamo/servlet/dafpipeline/HeadRestServlet
    2012-06-25 06:22:06,528 INFO [STDOUT] Unable to create class atg.rest.RestConfiguration for configuration /atg/rest/Configuration java.lang.ClassNotFoundException: No ClassLoaders found for: atg.rest.RestConfiguration
    2012-06-25 06:22:06,528 INFO [STDOUT] **** Error
    2012-06-25 06:22:06,528 INFO [STDOUT]      
    2012-06-25 06:22:06,528 INFO [STDOUT] Mon Jun 25 06:22:06 EDT 2012
    2012-06-25 06:22:06,528 INFO [STDOUT]      
    2012-06-25 06:22:06,528 INFO [STDOUT] 1340619726528
    2012-06-25 06:22:06,528 INFO [STDOUT]      
    2012-06-25 06:22:06,528 INFO [STDOUT] /
    2012-06-25 06:22:06,528 INFO [STDOUT]      
    2012-06-25 06:22:06,528 INFO [STDOUT] Unable to set configured property "/atg/rest/Initial.initialServices" atg.nucleus.ConfigurationException: Unable to resolve component /atg/rest/Configuration
    CLASSPATH ENTRY
    ============
    <classpathentry exported="true" kind="var" path="C:/ATG/ATG9.3/REST/lib/atg-rest-1.0.jar"/>
         <classpathentry exported="true" kind="var" path="C:/ATG/ATG9.3/REST/lib/commons-fileupload-1.2.1.jar"/>
         <classpathentry exported="true" kind="var" path="C:/ATG/ATG9.3/REST/lib/commons-io-1.4.jar"/>
         <classpathentry exported="true" kind="var" path="C:/ATG/ATG9.3/REST/lib/dom4j-1.6.1.jar"/>
         <classpathentry exported="true" kind="var" path="C:/ATG/ATG9.3/REST/lib/log4j-1.2.15.jar"/>
         <classpathentry exported="true" kind="var" path="C:/ATG/ATG9.3/REST/client-lib/java/atg-rest-client-1.0.jar"/>
    REST CLIENT:
    ========
    import java.util.HashMap;
    import java.util.Map;
    import atg.rest.client.RestClientException;
    import atg.rest.client.RestComponentHelper;
    import atg.rest.client.RestResult;
    import atg.rest.client.RestSession;
    public class RestClient {
    RestSession mSession;
    protected void execute() throws RestClientException {
         System.out.println("inside execute");
         mSession = RestSession.createSession("localhost", 8080, "<USERNAME>", "<PASSWORD>");
         mSession.setUseHttpsForLogin(false);
         try {
         mSession.login();
         System.out.println("Login Successful");
         catch (Throwable t) {
         System.out.println(t);
         finally {
         try {
         mSession.logout();
         System.out.println("Logout Successful");
         catch (RestClientException e) {
         System.out.println(e);
    * @param args
    public static void main(String[] args) {
         System.out.println("inside main");
         // TODO Auto-generated method stub
         RestClient testATGRest = new RestClient();
         try {
         testATGRest.execute();
         catch (Throwable t) {
         System.out.println(t);
    REST CLIENT ERROR SEEN:
    =================
    atg.rest.client.RestClientException: java.io.IOException: Not Found http://localhost:8080/rest/bean/atg/userprofiling/ProfileServices/loginUser
    atg.rest.client.RestClientException: This session is not logged in and cannot be logged out

    I am trying to expose a method using REST Webservice and access the method using the browser.I have followed the steps specified in the thread:
    http://ecomwriter.com/2012/03/19/building-restful-web-services-using-atg/ .Have added a component called ProfileRESTWebservice and have defined a method “getLoginInfo” in the class file. The following entry is placed in the restSecurityConfiguration.xml
    <resource component="/atg/userprofiling/ProfileRESTWebservice" secure="true">
    <method name="getLoginInfo" secure="false"></method>
    </resource>
    But, I am receiving the following exception when trying to access the method using http://localhost:8080/rest/bean/atg/userprofiling/ProfileRESTWebservice/getLoginInfo
    10:07:33,147 ERROR [BeanServlet] Error code: 400
    atg.beans.PropertyNotFoundException: Can't find property named: getLoginInfo in class: com.vs.commerce.profile.ProfileRESTWebservice
    Can't find property named: getLoginInfo in class: com.vs.commerce.profile.ProfileRESTWebservice
    atg.rest.RestException: atg.beans.PropertyNotFoundException: Can't find property named: getLoginInfo in class: com.vs.commerce.profile.ProfileRESTWebservice
    at atg.rest.output.RestOutputCustomizerImpl.outputBeanProperty(RestOutputCustomizerImpl.java:616)
    at atg.rest.processor.BeanProcessor.doRESTGet(BeanProcessor.java:157)
    at atg.rest.servlet.RestPipelineServlet.serviceRESTRequest(RestPipelineServlet.java:394)
    at atg.rest.servlet.RestPipelineServlet.service(RestPipelineServlet.java:237)
    at atg.servlet.pipeline.PipelineableServletImpl.passRequest(PipelineableServletImpl.java:135)
    at atg.servlet.pipeline.PipelineableServletImpl.service(PipelineableServletImpl.java:298)
    at atg.rest.servlet.RestPipelineServlet.service(RestPipelineServlet.java:241)
    Can you pl help me out on this?

  • Connecting ATG 10.1.2 with endeca 3.1.1 without CRS..

    Hi Guys,
    I'm trying to connect ATG 10.1.2 with endeca 3.1.1 without CRS Application. I'm able to connect to endeca app by using the OOTB configuration component.
    My real problem is "AssemblerPipelineServlet" is getting the ContentItem from the endeca for the requested page eg:"pages/browse" and forwarding the request to the cartridge JSP. But the fowarded page is not get compiled, Instead browser showing the complete jsp content.
    Any help in this regard will be much appreciated.
    -Rajaram
    Edited by: 991199 on Mar 1, 2013 10:46 AM
    Edited by: 991199 on Mar 1, 2013 6:58 PM

    Please find the web.xml below:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.5" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    <display-name>ATG Commerce Reference Store</display-name>
    <context-param>
    <param-name>atg.session.parentContextName</param-name>
    <param-value>/dyn</param-value>
    </context-param>
    <context-param>
    <param-name>atg.dafear.bootstrapContextName</param-name>
    <param-value>/dyn</param-value>
    </context-param>
    <context-param>
    <param-name>context-root</param-name>
    <param-value>prepaid</param-value>
    </context-param>
    <context-param>
    <param-name>atg.assembler</param-name>
    <param-value>true</param-value>
    </context-param>
    <filter>
    <filter-name>PageFilter</filter-name>
    <filter-class>atg.filter.dspjsp.PageFilter</filter-class>
    </filter>
    <filter>
    <filter-name>ForwardFilter</filter-name>
    <filter-class>atg.servlet.ForwardFilter</filter-class>
    </filter>
    <filter>
    <filter-name>ErrorFilter</filter-name>
    <filter-class>atg.servlet.ErrorFilter</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>ErrorFilter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>ERROR</dispatcher>
    </filter-mapping>
    <filter-mapping>
    <filter-name>ForwardFilter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>FORWARD</dispatcher>
    <dispatcher>ERROR</dispatcher>
    </filter-mapping>
    <filter-mapping>
    <filter-name>PageFilter</filter-name>
    <url-pattern>/*</url-pattern>
    <dispatcher>REQUEST</dispatcher>
    <dispatcher>ERROR</dispatcher>
    <dispatcher>FORWARD</dispatcher>
    </filter-mapping>
    <filter>
    <filter-name>ADCDataInsertFilter</filter-name>
    <filter-class>atg.filter.ConditionalDelegatingFilter</filter-class>
    <init-param>
    <param-name>targetFilter</param-name>
    <param-value>
    atg.adc.filter.ADCDataInsertFilter
    </param-value>
    </init-param>
    <init-param>
    <param-name>mimeTypes</param-name>
    <param-value>text/html,dynamo-internal/html</param-value>
    </init-param>
    </filter>
    <filter-mapping>
    <filter-name>ADCDataInsertFilter</filter-name>
    <url-pattern>/*</url-pattern>
    </filter-mapping>
    <servlet>
    <servlet-name>MappedJumpServlet</servlet-name>
    <servlet-class>atg.repository.seo.MappedJumpServlet</servlet-class>
    <init-param>
    <param-name>loggingDebug</param-name>
    <param-value>true</param-value>
    </init-param>
    <init-param>
    <param-name>jumpServlet</param-name>
    <param-value>
    ctx:dynamo:/atg/dynamo/servlet/dafpipeline/JumpServlet
    </param-value>
    </init-param>
    </servlet>
    <servlet>
    <servlet-name>NucleusServlet</servlet-name>
    <servlet-class>atg.nucleus.servlet.NucleusServlet</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet>
    <servlet-name>DynamoProxyServlet</servlet-name>
    <servlet-class>atg.nucleus.servlet.NucleusProxyServlet</servlet-class>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>MappedJumpServlet</servlet-name>
    <url-pattern>/jump/*</url-pattern>
    </servlet-mapping>
    <servlet>
    <servlet-name>link</servlet-name>
    <servlet-class>atg.endeca.servlet.NucleusPreviewLinkServlet</servlet-class>
    <init-param>
    <description>
    The Nucleus component path of the NavigationStateBuilder.
    </description>
    <param-name>navigationStateBuilderComponent</param-name>
    <param-value>/atg/endeca/assembler/cartridge/manager/NavigationStateBuilder</param-value>
    </init-param>
    <init-param>
    <description>
    The Nucleus component path of the ContentSource.
    </description>
    <param-name>contentSourceComponent</param-name>
    <param-value>/atg/endeca/assembler/cartridge/manager/WorkbenchContentSource</param-value>
    </init-param>
    </servlet>
    <servlet-mapping>
    <servlet-name>link</servlet-name>
    <url-pattern>/link.json/*</url-pattern>
    </servlet-mapping>
    <listener>
    <listener-class>atg.taglib.dspjsp.RegisterELResolverServletContextListener</listener-class>
    </listener>
    <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
    </welcome-file-list>
    <error-page>
    <error-code>404</error-code>
    <location>/global/pageNotFound.jsp</location>
    </error-page>
    <error-page>
    <error-code>500</error-code>
    <location>/global/serverError.jsp</location>
    </error-page>
    <error-page>
    <error-code>409</error-code>
    <location>/global/sessionExpired.jsp</location>
    </error-page>
    <jsp-config>
    <jsp-property-group>
    <url-pattern>*.jsp</url-pattern>
    <page-encoding>UTF-8</page-encoding>
    <scripting-invalid>true</scripting-invalid>
    <include-prelude>/includes/prelude.jspf</include-prelude>
    </jsp-property-group>
    </jsp-config>
    </web-app>

  • Migration from ATG Dynamo 5.1 to Weblogic 10.3 Server

    Hi,
    We are currently involved in a project in which the application has be
    migrated from the ATG Dynamo Server 5.1 to Weblogic 10.3 application
    server.
    While doing this we are facing some problems related to
    DynamoHttpServletRequest.
    Previosly the code was written as below:
    DynamoHttpServletRequest atgRequest = (DynamoHttpServletRequest)
    request;
    HttpSession atgSession = (HttpSession) atgRequest.resolveName("/" );
    Since we are moving to the weblogic server we are planning to remove
    the DynamoHttpServletRequest and use the javax HttpServletRequest.
    But to do this i am unable to find the functionality that does
    resolveName("/" ).
    I tried writing the below 2 lines of code inplace of the 2 lines of
    code above, but it is not solving the purpose.
    HttpServletRequest weblogicRequest = (HttpServletRequest) request;
    HttpSession weblogicSession = (HttpSession)
    weblogicRequest.getSession();
    Can anybody please help me in solving this problem where i can replace
    DynamoHttpServletRequest with HttpServletRequest.
    Any suggestions are welcome.
    Thanks in advance
    Shailendra

    Hi Ravi,
    Thanks for your response.
    While migrating we have tried to remove the ATG dependency and we are getting session invalid. We are unable to find a similar method for “resolveName” in HTTPServletRequest. The method “resolveName” of the DynamoHttpServletRequest is being used to retrieve the session object by passing a String parameter (‘/’ or any URL).
    Whereas the HTTPServletRequest has only two methods [getSession() or getSession(Boolean)] to retrieve the session object and here we cannot pass any String parameter. Thus we are unable the replicate the existing functionality using the HTTPServletRequest class.
    Below are some code examples for your reference.
    Sample1:
    Below commented code is original one. we tried to as mentined below:
    //import atg.servlet.DynamoHttpServletRequest;
    /* DynamoHttpServletRequest atgRequest = (DynamoHttpServletRequest) request;
    HttpSession atgSession = (HttpSession) atgRequest.resolveName("/" );
    String atgsession = "jsessionid=" + atgSession.getId();
    HttpServletRequest weblogicRequest = (HttpServletRequest) request;
    HttpSession weblogicSession = (HttpSession) weblogicRequest.getSession();
    String weblogicsession = "jsessionid=" + weblogicSession.getId();
    Sample2:
    Below commented code is original one. we tried to as mentined below:
    /* ATG Dynamo for Session Last Access Time functionality */
    //import atg.servlet.DynamoHttpServletRequest;
    /* DynamoHttpServletRequest atgRequest = (DynamoHttpServletRequest) request;
    HttpSession session = (HttpSession) atgRequest.resolveName("/atg/dynamo/servlet/sessiontracking/SessionManager/" + sessionID);
    HttpServletRequest weblogicRequest = (HttpServletRequest) request;
    HttpSession session = (HttpSession) weblogicRequest.getSession();
    we would like to know is there any smilar functionality or methods available so we can use in HttpServletRequest or servlets.
    Thanks,
    Nagesh

Maybe you are looking for

  • Reporting tab is not shown in the console

    hi everyone the reporting tab is not shown in the service manager console, the topology i am using is 2 servers [one for DW and the other for management server] both servers have their SQL server installed on each one, could you please tell me how i

  • Weird problems with Leopard on iMac G5

    I've started having some weird problems-I think they may have started after running iDefrag, please no discussions about whether to defrag or not, but I'd done it before since upgrading to Leopard and nothing like this ever happened-sometimes while l

  • Valuation and account assignment

    Hi, during MIRO system generates the following error, I cannot understand what is the problem: Acct determination for Tax exchange rate differences with keys   not defined  in ch/acts PDCA                                                              

  • New N73 ME 4.0727.2.2.1 doesn't fix GPS problems

    I have updated to this new firmware looking forward to see the problems with GPS bluetooth solved, but the problem is still there. Tomtom doesn't find any GPS receiver.

  • Error in startup the petstore application

    Dear all When i run the petstore with our DB.It is create table with the SEQUENCE column name.But Sequence is the keyword in our DB.Then how it is created the table with this column name.Plz give any suggestion. Through which file it is creating the