How to create a cookie in PEI?

I’m trying to create a cookie in OnAfterLogin event, using the ApplicationData class method SetCookie(string,string), but some reason cookie is not created in the Temporary Internet Files.
Basically I need to use this cookie in other application to check the portal community access.

It worked with following code, Cookie values username and ID are getting from the session.
     HttpCookie MyCookie = new HttpCookie("PTUser");                    MyCookie["PTUser"] = USername;          MyCookie["PTUSerID"] =      UserID;          MyCookie.Expires = DateTime.Now.AddDays(1d);                         XPCookie aCookie = new XPCookie(MyCookie);                         _appData.SetCookie(aCookie);                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

Similar Messages

  • How to create two cookie array?

    hello~
    I want to set two cookies, like
    Cookie c = new Cookie(Name, Value);
    Cookie d = new Cookie(Name, Value);
    but when I trow them into two arrays, like
    Cookie cookies[], delcookies[];
    I don't know how to get them, like
    cookies = request.getCookies();
    delcookies = request.getCookies();
    but it seems wrong!
    Does somebody can tell me how to do, please?
    Thanks very much!!

    hello~
    I want to set two cookies, like
    Cookie c = new Cookie(Name, Value);
    Cookie d = new Cookie(Name, Value);
    but when I trow them into two arrays, like
    Cookie cookies[], delcookies[];
    I don't know how to get them, like
    cookies = request.getCookies();
    delcookies = request.getCookies();
    but it seems wrong!
    Does somebody can tell me how to do, please?
    Thanks very much!!Is this what you wanted?Cookie c = new Cookie(Name, Value);
    Cookie d = new Cookie(Name, Value);
    Cookie[] cookies = new Cookie[2];
    cookies[0] = c;
    cookies[1] = d;

  • How to create a custom plugin in Oracle Access Manager to create a cookie

    How to create a custom plugin in Oracle Access Manager to create a cookie or Header Variable..
    Vipin

    Its has more steps which you need to consider in addition to Note:101048.1 which is mentioned by Prashant_Pathak. Both notes have enough information. If not, let's know what else you need to set

  • How to create cookies in webdynpro and How to read from cookies

    Hi all
    Please let us know how to create cookies and how to store and retrieve the data from cookies in webdynpro.
    we have the following requirement in each and every webdynpro form we have dropdownbox UI element , when ever a user logins into portal then he will select his state from the dropdownbox UI element then when even again the same user logs into portal and select the state field then the previously existing value which ever used in cookies that should be selected as dropdownbox.
    can you please send sample codes how to create and read the data from cookies in webdynpro?
    if you have any useful links or documents on this cookies in webdynpro then it would be great help to us.
    Thanks in advance.
    Regards
    Kalki reddy

    Hi,
    Have a look at the following thread:
    Re: How to use Cookies in Web DynPro?
    This may help you.
    Regards.
    Rajat

  • How to create a session cookie on demand

    Hi,
    I search the web but couldn't find anything related to creating session cookies on demand. I want to create a session cookie storing encrypted user tokens when there is none, for example, when the first page is called.
    The encryption part is OK, but I want how can I intercept every call to a set of pages and create the session cookie if it doesn't exist.
    I'm using ADF, of course, and Weblogic.
    Anyone can provide some examples or source code?
    Thanks.

    Cookies are accessible via the http request and response, there you can add new cookies and or change existing ones.
            ExternalContext ectx = FacesContext.getCurrentInstance().getExternalContext();
            HttpServletResponse response = (HttpServletResponse) ectx.getResponse();
            // get existing cookies
            Cookies [] cookies =((HttpServletRequest)ectx.getRequest()).getCookies();
            // create and set a new one
            Cookie cookie = new Cookie( "key", "value" );
            response.addCookie( cookie );This code should work in a bean. After setting the cookie you need to implement a servlet filter or a page phase listener where you check the requested url and then check for your cookie.
    Timo

  • How to create and access cookie with in iView ?

    Hi,
    I have created iViews using .Net PDK for SAP.
    Is it possible to create a cookie using code of iView and use this cookie to access an external application.
    Regards,
    Vikas Khandpur

    U cud add this code to the java iview:
    setting a cookie:
    Cookie fCooky = new Cookie("flag","false");
    response.addCookie(fCooky);
    fCooky.setPath("/");
    Reading the cookie:
    Cookie[] cook = request.getServletRequest().getCookies();
    for (int i = 0; i < cook.length; i++){
    Cookie cc = cook<i>;
    if(cc.getName().equals("flag")){
       response.write(cc.getValue()toString());
    Iam not sure how u wud do it in a .NET Iview.
    Sry!
    Regards,
    P.

  • How many no.of cookies can be created....

    Cookie c=new Cookie("mycookie",data);
    res.addCookie(c);With the above piece of code ..i can create a cookie...but if i need to create more for different sites ..How it can be possible...

    I am not sure in java, I guess it would depend on the memory available to the jvm. I think browsers have different permitted amounts though. Try reading the web page below as it might provide you with some more information:
    [Browser Cookie Limits|http://www.ghacks.net/2008/08/16/browser-cookie-limits/]

  • How to create a user in UME Database using web dynpro java custom application

    Hi,
    Can you please suggest me how to create a user in UME Database using web dynpro java custom application.
    My Requirement is user can register his/her user id in SAP Portal 7.3 UME database.
    Please suggest me.
    Thanks and Regards,
    Amit

    Hi Amit,
    Generated Documentation (Untitled)
    This is what you're looking for, there's no real cook-book -- though Amey mentioned there might be some material on SDN, perhaps some tutorials.
    You should be looking into com.sap.security.api.IUserFactory, methods newUser(String) which gives you and IUserMaint and commitUser(IUserMaint, IUserAccount) -- IUserAccount can be obtained using com.sap.security.api.IUserAccountFactory, method newUserAccount(String)
    Hope it helps,
    D.

  • How do I use cookies to control which part of the timeline to play from?

    Hi there,
    I have created an animation with Adobe Edge. My site uses Concrete5 and I am pulling in the Edge content into an IFRAME on my home page (there my be a better way to do this and I'm open to suggestions). I want the animation to play from the start when someone first visits the site, but if during their browser session they navigate back to the home page, I want the animation to only play a shorter segment of frames near the end.
    My question is, how do I use cookies to acheive this? I'm new to javascript/jquery.
    I've included the following code on compositionReady, (found in another post on this forum) but don't have a clue how to continue...
    // insert code to be run when the composition is fully loaded here yepnope(   {     nope:[       '/js/jquery.cookie.js'     ],   complete: init   } ); function init() { //create your cookie's initial values here } 
    My temp site is here - http://79.170.40.43/nutcrackerdesign.co.uk/
    On revisting the homepage, I only want to play from when the green 'How can we help?' button drops in.
    Many thanks!
    Russ

    Hi, Russ-
    I found this article, which seemed really helpful in describing how cookies work in JavaScript:
    http://www.quirksmode.org/js/cookies.html
    Remember that JS works just fine within Animate, so on your compositionReady, you can read your cookie and then set the play based on that.  You should probably uncheck the autoplay for your Stage and control the play of your Stage from the compositionReady.
    Good luck!
    -Elaine

  • How do I add cookies to adobe muse site?

    Hello,
    I am creating a site in Adobe Muse, which I also host through the webbasic adobe business catalyst account.
    I want to add a cookies message onto my site and to that of client sites that I create.
    I searched the forum and there appears to be a guide showing how to get the cookies set up in adobe business catalyst itself. However, when I try to follow the instructions, I fall at the first hurdle because it tells me to go into Site Manager and then into Pages. However, I don't have anything that says Pages. Mine only has two options; Web Forms and System Emails. The only thing in the Web Forms folder is Contact Form.
    I have no idea how to get the cookies message onto my Adobe Muse site. Please...does anyone know the answer?
    Also, if someone from Adobe reads this, it would be great if Adobe Muse had a widget for this...considering it is now a requirement for all websites that use cookies to be able to get consent. I hope it's in the next update.
    Cheers
    Sebastian

    Refer to this thread for instructions on adding a Manage cookies form - http://forums.adobe.com/message/539301
    The online content editing is disabled by default for sites published through Muse to BC and hence the Pages tab doesn't appear for you under Site Manager. However, you can always enable the Online Content editing feature by logging into the site admin -> going to the My Details section (by hovering over your name at the top right) and enable the option as indicated in the screenshot below.
    Please refer to the following post for a reason as to why the option is incompatible with Muse (but doesn't affect any functionality as such if you enable it).
    http://forums.adobe.com/message/4385787.
    Thanks,
    Vinayak

  • How to get browser cookies in a servlet

    Hi,
    I need to use the browser cookie in my servlet, how can i get the browser cookies in a servlet
    Thanks in advance

    Thank you for ur reply, now i can create the cookies from the servlet,
    and now i need to create the cookies from the javascript, i have the code, and it can also create the cookies, but they can be accessible for Encrypted connections only, but the cookies which will be created from java servlets can be accessible for any type of connections,
    so please help me how to create cookies from the javascript and that should be accessible for any type of connections

  • How to create a new session in JSP file

    Usually a child IE window uses same session with parent window. Dose someone know how to create a new session when creating a new IE window by clicking a URL in parent window? The web page is writen by jsp file.

    I am not sure of your question. Are you wanting to have 2 Session objects (one for the parent window and another for the child)?
    A session is usually created once per client and is stored on the server the session id is carried around in a cookie or a URL rewrite so that everytime the user submits a page you will be able to store/access information.
    // this will create a new session object if one doesn't already exist.
    HttpServletRequest.getSession( true );
    Hope this helps

  • Error is in example  "How to Create Online and Offline Forms in Web Dynpro"

    Hi,
    I am developing " How to Create Online and Offline Forms in Web Dynpro " in nwds 7.0. This is standard example which is available at sdn. but when i run it gives me error like "
    Failed to process request. Please contact your system administrator.
    [Hide]
    Error Summary
    While processing the current request, an exception occured which could not be handled by the application or the framework.
    If the information contained on this page doesn't help you to find and correct the cause of the problem, please contact your system administrator. To facilitate analysis of the problem, keep a copy of this error page. Hint: Most browsers allow to select all content, copy it and then paste it into an empty document (e.g. email or simple text file).
    Root Cause
    The initial exception that caused the request to fail, was:
       java.lang.NullPointerException
        at com.travelrequestapp.TravelRequestComView.wdDoInit(TravelRequestComView.java:97)
        at com.travelrequestapp.wdp.InternalTravelRequestComView.wdDoInit(InternalTravelRequestComView.java:133)
        at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doInit(DelegatingView.java:61)
        at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
        at com.sap.tc.webdynpro.progmodel.view.View.initController(View.java:445)
        ... 34 more
    See full exception chain for details.
    System Environment
    Client
    Web Dynpro Client Type HTML Client
    User agent Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1)
    Version null
    DOM version null
    Client Type msie6
    Client Type Profile ie6
    ActiveX enabled
    Cookies enabled
    Frames enabled
    Java Applets enabled
    JavaScript enabled
    Tables enabled
    VB Script enabled
    Server
    Web Dynpro Runtime Vendor: SAP, build ID: 7.0009.20060804145649.0000 (release=645_VAL_REL, buildtime=2006-08-26:14:41:58[UTC], changelist=413534, host=pwdfm101), build date: Thu Feb 15 10:23:57 IST 2007
    J2EE Engine 7.00 patchlevel
    Java VM Java HotSpot(TM) Server VM, version:1.4.2_13-b06, vendor: Sun Microsystems Inc.
    Operating system Windows 2003, version: 5.2, architecture: x86
    Session & Other
    Session Locale en_US
    Time of Failure Mon Oct 29 12:13:24 IST 2007 (Java Time: 1193640204484)
    Web Dynpro Code Generation Infos
    local/TravelRequest
    SapDictionaryGenerationCore 7.0006.20051128142640.0000 (release=645_VAL_REL, buildtime=2006-01-14:14:59:42[UTC], changelist=378068, host=PWDFM101.wdf.sap.corp)
    SapDictionaryGenerationTemplates (unknown)
    SapGenerationFrameworkCore 7.0006.20050713144242.0000 (release=645_VAL_REL, buildtime=2006-01-14:14:48:59[UTC], changelist=357697, host=PWDFM101.wdf.sap.corp)
    SapIdeWebDynproCheckLayer 7.0006.20051128151834.0000 (release=645_VAL_REL, buildtime=2006-01-14:15:05:10[UTC], changelist=378108, host=PWDFM101.wdf.sap.corp)
    SapMetamodelCommon 7.0006.20050929162929.0000 (release=645_VAL_REL, buildtime=2006-01-14:14:49:45[UTC], changelist=369752, host=PWDFM101.wdf.sap.corp)
    SapMetamodelCore 7.0006.20050929162929.0000 (release=645_VAL_REL, buildtime=2006-01-14:14:49:38[UTC], changelist=369752, host=PWDFM101.wdf.sap.corp)
    SapMetamodelDictionary 7.0006.20051128142655.0000 (release=645_VAL_REL, buildtime=2006-01-14:14:57:39[UTC], changelist=378069, host=PWDFM101.wdf.sap.corp)
    SapMetamodelWebDynpro 7.0006.20051128151854.0000 (release=645_VAL_REL, buildtime=2006-01-14:15:02:09[UTC], changelist=378109, host=PWDFM101.wdf.sap.corp)
    SapWebDynproGenerationCTemplates 7.0006.20060111154644.0000 (release=645_VAL_REL, buildtime=2006-01-14:15:18:33[UTC], changelist=384368, host=pwdfm101)
    SapWebDynproGenerationCore 7.0006.20051128151834.0000 (release=645_VAL_REL, buildtime=2006-01-14:15:05:21[UTC], changelist=378108, host=PWDFM101.wdf.sap.corp)
    SapWebDynproGenerationTemplates 7.0006.20060111154644.0000 (release=645_VAL_REL, buildtime=2006-01-14:15:18:33[UTC], changelist=384368, host=pwdfm101)
    sap.com/tcwddispwda
    No information available null
    sap.com/tcwdcorecomp
    No information available null
    Detailed Error Information
    Detailed Exception Chain
    java.lang.NullPointerException
         at com.travelrequestapp.TravelRequestComView.wdDoInit(TravelRequestComView.java:97)
         at com.travelrequestapp.wdp.InternalTravelRequestComView.wdDoInit(InternalTravelRequestComView.java:133)
         at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doInit(DelegatingView.java:61)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)
         at com.sap.tc.webdynpro.progmodel.view.View.initController(View.java:445)
         at com.sap.tc.webdynpro.progmodel.controller.Controller.init(Controller.java:200)
         at com.sap.tc.webdynpro.progmodel.view.ViewManager.getView(ViewManager.java:709)
         at com.sap.tc.webdynpro.progmodel.view.ViewManager.bindRoot(ViewManager.java:579)
         at com.sap.tc.webdynpro.progmodel.view.ViewManager.makeVisible(ViewManager.java:793)
         at com.sap.tc.webdynpro.progmodel.view.ViewManager.performNavigation(ViewManager.java:296)
         at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.navigate(ClientApplication.java:767)
         at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.navigate(ClientComponent.java:873)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doNavigation(WindowPhaseModel.java:498)
         at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.processRequest(WindowPhaseModel.java:144)
         at com.sap.tc.webdynpro.clientserver.window.WebDynproWindow.processRequest(WebDynproWindow.java:335)
         at com.sap.tc.webdynpro.clientserver.cal.AbstractClient.executeTasks(AbstractClient.java:143)
         at com.sap.tc.webdynpro.clientserver.session.ApplicationSession.doProcessing(ApplicationSession.java:299)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessingStandalone(ClientSession.java:711)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doApplicationProcessing(ClientSession.java:665)
         at com.sap.tc.webdynpro.clientserver.session.ClientSession.doProcessing(ClientSession.java:232)
         at com.sap.tc.webdynpro.clientserver.session.RequestManager.doProcessing(RequestManager.java:152)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doContent(DispatcherServlet.java:62)
         at com.sap.tc.webdynpro.serverimpl.defaultimpl.DispatcherServlet.doPost(DispatcherServlet.java:53)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)
    So please help me to correct this error .....
    Help will be rewarded.
    Regards,
    Gurprit Bhatia

    Hi Gurprit,
    A null value is being passed at runtime. Make sure that you enter values when filling in the form.
    Also check for the cardinality of the nodes being used. You can also initiliaze your value attributes as follows:
    In wdDoInit() method:
    wdContext.currentNodeAElement.setValueA("");
    Context is as follows:
    RootNode
      |____NodeA
            |_____ValueA
    Hope it helps.

  • How to create Mount Point in Linux

    Hi,
    I m new to Linux OS, want to install Oracle EBS R12 on OEL 5.6 . I have downloaded s/w and installed all required packages for OEL.
    Now i want to create Staging directory at location /u01/StageR12.
    Can anyone guide me for how to create Mount point /u01 and how to assign space of 53 GB to it.... ?
    Reply awaited...

    You're on the right path.
    Keep in mind though what you need partition wise just for o/s install. You should have at least 3 partitions:
    - a ?? GB partition for the / (root) mount (the size depends on what you will install and how much space you will need for running that s/w)
    - a 128MB or larger partition for the /boot mount
    - a ?? GB partition as swap space mount (typically rule of thumb is 2x RAM for 4GB and lower, else around 25% of total RAM)
    I would not create separate partitions for the old-style +/u01+ mount points for Oracle. That part of the OFA (Oracle Flexible Architecture) standards are old and pre-ASM and pre- automated Oracle managed data files.
    You need space for installing an Oracle Home. I do not see the need for a dedicated mount point for that. I use the root file system.
    You need space for the actual database. If you use Oracle ASM, then I would create raw partitions (across disks) to be used for database storage. These will not be mounted or formatted. Instead these will be assigned to an ASM diskgroup (and striped by default) and used for database storage.
    If you do not use ASM, then you need a cooked file system for storage of database file. In that case separate mount point(s) make sense. Also, it makes sense not to manually apply the old OFA standards, but instead use Oracle managed database files. In that case you need a single mount point (e.g.<i>/oracledb</i>) - and set that as the base directory for Oracle to use for the database. Oracle will create an OFA compliant database directory tree and files under that base directory/mount point.
    Keep in mind that the more mount points you have for the database, the more difficult your job becomes to manage storage. The easiest is a single mount point for the database and using Oracle to manage the OFA compliant side for you on that mount point.
    Also, you cannot and should not attempt some kind of manual striping layout of the database across multiple mountpoints. This may have made some sense back 10+ years ago. It no longer does.

  • Learning to create a cooking recipe App

    I would like to learn how to create a Mac app for managing cooking recipes similar to MacGourmet.  Over the years I have used many Windows and Mac cooking programs.  Most are good but I would like to assemble features I prefer.  I assume it must be database driven.  I know how to write websites (but not  javascript) using Dreamweaver and I took a few SQL classes years ago. I do enjoy working with computers. With Lion coming soon, I would like to learn using the latest OS.  Eventually I would like to distribute and perhaps sell my program. 
    I must wait until the upcoming fall semester to enroll in any college courses.  I thought about starting at lynda.com with Objective-C Essential Training or perhaps a few books. 
    Any help to get started would be appreciated. Thank you.

    You've stated your goals....what help do you need from others here, specifically?
    Seen this? iPhone Developer Beginner Resource Guide
    Books on Cocoa...ok. Books on iOS...don't bother. Pay the dev fees and use the resources there.
    Good luck in any case.

Maybe you are looking for

  • HOW DO I GET MY OLD ITUNES BACK? THE DOWNLOAD MESSED UP MY WHOLE SYSTEM!!!

    THE DOWNLOAD MESSED UP MY WHOLE SYSTEM!!! Before my i-tunes was steller, now i have the **** hard time locating, organising, basically everything. it's so counter-intuitive how do i get my old i-tunes back?

  • Transport problem - newest versions overwrite by olders during transport

    Hello everybody! I am writing my master thesis, which mainly focuses on problems with transport in SAP, precisely with data inconsistence. Let's consider the following situation: In DEV: 1) Create change request R1 containing object O(1), 2) Release

  • JMenu with AWT component

    dear friends; i have added menu bar in Jframe which is containes menues. AWT component is added the the same frame . problem is: menues are overlapping with awt component while i clicked the menu bar. dear friends help me immediately. thank u

  • Ipad wont sync to iTunes on Macbook Pro

    my dad just updated his ipad to IOS 7, and now it will not sync with his iTunes account on his Macbook Pro. Whenever he plugs it in, he gets the same message "The iPad cannot be used because it requires iTunes version 11.1 or later. Go to www.itunes.

  • Corresponding Logic 16 Midi channels to Korg Triton 16 midi channels

    Heyyy---- I use to use protools, but I switched over to Logic. What I do is, I recorded all my beats inside my triton., using all 16 tracks in my triton. When I finish I would then slave my triton to pro tools. Then I would create 16 midi channels in