How to use cookie in OAF?

Hi,
I want to set cookies from OAF controller.
Any thought or code snippet?
Abdul Wahid

Thanks keerthi,
Late reply.I guess, the article is about how oaf foundations is maintaining states.
I did try search, but didn't get any direct solution to use cookies just like its used in servlets.
The requirement was to maintain session information above the user level sessions. Custom servlet cookies looked fine, but couldn't get way to set those in OAF.
However, if some body gets similar requirement, the solution found, was, "pageContext.putSessionValueDirect" method.
Thanks again brother.
Abdul Wahid

Similar Messages

  • How to use cookies in jsp

    Hi all,
    I'm new to jsp, please let me know how to use cookies with jsp.
    I have three web applications, in run time I have to switch from one application to another application based on single login page. I have taught cookies are one of the solution. But while I'm googling I unable to get such a good material.
    please give some examples,
    Thanks in advance.
    achchayya

    Read a cookie in jsp
    HttpSession session = request.getSession();
    Cookie cookie_session = getCookie(request, "COOKIENAME");
              if (cookie_session == null) {
                   sesID = session.getId();
              } else {
                   sesID = cookie_session.getValue();
              }or
    get all cookie in the browser
    This gets all the cookies and according to the cookie name given u can get the cookie value
    Cookie[] cookies = request.getCookies();
              if (cookies != null) {
                   for (int i = 0; i < cookies.length; i++) {
                        if (cookies.getName().equals(cookieName))
                             return cookies[i];
                   }but i am not sure if this works for ur requirement try and see                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Urgent: how to use cookies or session in javafx

    Hi....
    i am new to javafx and need help to learn how to use cookies and session in javafx.i want to create a simple website using javafx.....
    Urgent reply is requested
    mufaddal

    Please correct me if I'm wrong: I think LiveConnect is not supported on IE, and Mozilla has plans to discontinue it.
    Didn't an earlier version of JavaFX allow access to the Applet instance, including the AppletContext? Seems to me, just generally, that JavaFX applets are hobbled unless they have that functionality available. Cookies are one example. Also applet parameters, hyperlinks, and the browser status display.
    Especially hyperlinks.

  • How to use cookies in struts

    hai
    iI am new to struts. I want to get value in text field from one form to another using cookis in struts, can any one help me?, please...

    To write a cookie in Struts, you create one and add it to the response object. (response.addCookie(cookie)).
    To read it, you use the bean:cookie tag.
    As to use cookies to get a given value from one form to another, there might be better ways, like using request attributes.
    You might be better off keeping those cookies in the jar, after all.

  • How to use Cookies in Web DynPro?

    Hello,
    Is there a way to use Cookies in Web DynPro like a regular Servlet uses in it's response Object?
    If yes, I could use a code example...
    Roy

    Hi Roy,
    1. This will create a Request Objec containing all the client's request just like in a regular Servlet or does it have special considerations I should worry about?
    A: If you have portal and webdynpro components, both have to use the same runtime. If you are using only webdynpro components then you can use the "Task" class. But it is a non-standard API.
    Task.getCurrentTask().getWebContextAdapter().getHttpServletRequest()
    2. Where do you recommend putting this statement? I assume at the wdDoInit() method right?
    A: Don't put this statement in the doInit(), if you are handling some event within the component and refreshes the view, your doInit() will not get executed.
    3. Is there a Response object I can create as well?
    A:
    HttpServletResponse response =((com.sap.tc.webdynpro.services.sal.adapter.core.IWebContextAdapter) WDWebContextAdapter.getWebContextAdapter()).getHttpServletResponse()
    Regards,
    Santhosh.C

  • 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

  • Using Cookies

    Hi there
    I have a report template, inside of which is a div containing drop down boxes. I want to use a button to hide/show the div.
    The code to do that is quite simple, however, I want to be able to 'remember' the view state of the div with subsequent page refreshes ( as happens when a value is selected from the drop down ).
    I thought I could use client-side cookies to achieve this, and for the most part this works.
    However, the first time I set the cookie, it doesn't seem to save the value.
    So, the process behind the scenes, is as follows:
    1. Enter the page for the first time ... cookie doesn't exist and div is hidden
    2. Click on the SHOW button, which sets the cookie to visible, and displays the div.
    3. Select a value from one of the dropdowns in the div, which reloads the page.
    4. As the page loads, the cookie should be read and the div display, but I find that the cookie is null or doesn't exist. If I now follow steps 2 and 3 again, next time the page loads, the cookie is read.
    So ... the cookie doesn't seem to be set on the first action, but does work correctly on subsequent actions ... very confusing ??
    Any ideas?
    Cheers,
    Andrew

    Hi,
    You can find the info on how to use cookies here:
    http://java.sun.com/developer/onlineTraining/Programming/JDCBook/aucserv.html
    Hope this helps you
    Cheers
    Giri :-)
    Creator Team

  • 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 to set cookie value in one page and retrieve in another page using setA

    How to set cookie value in one page and retrieve in another page using setActionListener?
    I have tried with following code srcpage.jspx->destpage.jspx
    srcpage.jspx
    <af:table value="#{bindings.DepartmentsView1.collectionModel}"
    var="emp" rows="#{bindings.EMPView1.rangeSize}"
    first="#{bindings.EMPView1.rangeStart}"
    emptyText="#{bindings.DepartmentsView1.viewable ? 'No rows yet.' : 'Access Denied.'}">
    <af:column sortProperty="EmployeeName" sortable="false"
    headerText="Cookie Testing">
    <af:commandLink text="#{emp.EmployeeName}" action="success">
    <af:setActionListener from="#{emp.EmployeeName}"
    to="#{cookie}"/>
    </af:commandLink>
    </af:column>
    </af:table>
    espage.jspx
    <af:outputText value="Test Cookie Value: #{cookie}"/>
    ,Here Test Cookie Value prints the following instead of its original String value
    {JSESSIONID=javax.servlet.http.Cookie@7da288, oracle.uix=javax.servlet.http.Cookie@399f62}
    I have passed employee name "Robert" to cookie in srcpage.jspx,but it prints "JSESSIONID....." instead of "Robert" in destpage.jspx
    Thanks in advance
    Kalee

    Hi,
    "cookie" is a reserved name. If you want to write to a session scope attribute called "cookie" then you have to call #{sessionScope.cookie}. If you want to use EL to set and read from cookies then you will have to use
    #{cookie.cookieName}
    Note that #{cookie} writes to and returns a map
    check this: http://www.informit.com/articles/article.aspx?p=30946&seqNum=7
    Frank

  • How to use session cookie property of System object?

    Hi all,
    I have searched all over the SDN but didnt get anything relevent so here i am posting my query...
    My scenario is as follows:
    I have created a KM document iview that launches an HTML page, on click of button of HTML page a VC iview is launched. On this iview i have a button that hits BI query.
    PS: A system object is created for the connectivity bet portal and backend BI server.
    PS: i have configured SSO between portal and backend.
    Now when i click on button on iview that fetches the data from backend, i am asked for authentication pop-up, although i have configured SSO why i am asked to enter UID and PWD again??
    In system object there is a property named
    <b>"session cookie = MYSAPSSO2"</b>
    So should i use this property so that cookie will get transfered from one session to other session when i click button on iview??
    If yes then HOW??
    Is there any other setting remained in Visual Admin?? or Backend or portal?
    What could be the missing??
    PS: User id are same on portal & backend.
    Any help will be highly appreciated...
    Regards,
    Ameya
    Thanks in advance
    Message was edited by:
            Ameya Pimpalgaonkar
    null
    Message was edited by:
            Ameya Pimpalgaonkar

    Hi Ameya,
    I do not know the exact answer.However you should look for something called JSESSION ID.
    Have a look at the thread:
    Re: Problems Using Application Integrator for BSP Application
    Reg SSO Logon Tickets and Browser sessions
    How to use jsessionid while making HTTP calls??
    Hope you find something which can help you.
    Regards
    Atul Shrivastava

  • How to define and use cookies so that same login is used on all application

    Hi
    I have 3 apps in a single workspace and all of them SSO enabled
    However when I go from one apps to other, it ask for login again
    I have read in the forum that we can use cookies so that we use the single login on all apps within the same workspace
    But I'm not sure how to define and use cookies.Please assist

    See this presentation:
    http://www.sumneva.com/apex/f?p=15000:395:0::NO::P395_PRESENTATION_KEY:MANY_TO_ONE

  • How can I use cookies in Web Content Overlays?

    I have a survey created with Google Docs. It uses cookies to tell if a user has already submitted an answer to a survey.
    It seems to me that these cookies are not stored with web content overlays (I've used the direct URL to the survey as input).
    Am I right? Is there a way to make the cookie thing work?
    br, Simon

    Hi,
    Is this procedure still available in 9iAS and RDBMS 8.1.6 ? I am trying to get it to work, and I keep getting "ORA-00942: table or view does not exist". The owner of this package is "SYS". I even tried prefixing the table name in the SQL string passed to calendarprint with the owner, and it still gave me this error. Does this have anything to do with the invoker rights model ? I need to set up a web calendar and would love to use this functionality...
    What gives ?
    Any help would be appreciated.
    Thanks you

  • How to use OAF transform sotred xml documents using XSLT...

    Does anyone have any experience using XSLT in OAF? Specifically, I have xml documents stored in a clob to which I wish to apply an XSLT transformation and then store the transformed documents back into the clob. Is there a way to apply an XSLT transformation using say BI-Publisher via OAF?

    "XML DIFF" are the keywords you can use to search for products that do this. Last time I looked there was a lot of XML Diff implementations, but none of them produced human-readable output that I really liked. I expect that's because XML diff is an easy thing for people to ask for but not an easy thing to do, given the considerable number of ways there are to change a document.

  • How use Cookies with flex

    Hi,
    Can we use cookies in flex. If so, can any body give me the
    sample code for that.
    Thanks
    Satish KC.

    Rather than ordinary cookies, use Local Shared Object. It is
    much more powerful than standard cookies.
    I'll look for an example. What version of Flex are you using?
    Tracy

  • How to use your Global ready phone in Mexico.

    PREVIEW
    Traveling Abroad in Mexico with a Verizon Phone
    How to Use a Verizon Global Ready Phone Abroad
     So your planning a trip to Cancun Mexico and want internet/cell service with out paying Roaming fees to your U.S service provider here is what you need to know to have access to Facebook, Vonage, Google maps, email and other apps while abroad.
    I will cover two bases one for your Global ready/Unlocked phone and the other for a personal Hotspot in your room or wherever your laptop will be this is only If you plain to purchase or have semi-free WiFi service from the Hotel.First I will cover your smartphone:
    The phone I used and test this with was mostly on my Razr Maxx from Motorola from the Verizon network. This can also worked with a Iphone 4S (You need to call Verizon First before traveling) please check out this thread to use your iPhone Unlocking Iphone for International Travel
    Note: you only have to do this once per-iPhone after that it is global ready as long as you own it.
    For a Android phone they are Global ready phones no need to call Verizon it is already ready. Popular Android phones that are Global ready ie. Razr, Razr Maxx,plus both HD versions also, The Samsung GS3 and GS4 are Global ready.
    For those who don't know, All Verizon 4G phones carry a sim card inside. They can be replace with a non-U.S carrier sim.(Make sure you insert the sim in the right way or it will not work.) If you try to use a none Verizon sim in the U.S it will be blocked by The Verizon network.
    Verizon runs off of both GSM and Cdma networks but while aboard you have a option to change these features.
    By pressing the menu button click System Setting> More / Wireless & Networks>Mobile Networks>Network Mode.
    Step 1.
    Most important leave your phone in airplane mode once you reach your destination you can still use WiFi while your phone is in this mode. While in Mexico or any country aboard you will need a local sim from any carrier that is GSM. A prepaid sim works great, some/most company's will make you pay a fee for the sim and they will not provide any help with setting your phone up to there services.
    Here are a two reasons why. #1 You did not buy it from them. #2 They really don't know your Verizon, AT&T and T-mobile phone setup, Yes it is different then the same phones they sell on their own network. So buying a prepaid sim card is your best option then paying roaming fees to your U.S carrier.
    After you have you sim you purchase the Data amount you think you will need you I got 1GB which was way more then enough for 5 days. I was consistently using my phone checking in on Foursquare etc.. you will also receive a local phone number too. I used a telcel sim card In Cancun The Telcel company is located in the Hotel Zone # 2 Blvd Kukulcan Km 12.5 77500 Cancún, Quintana Roo, Mexico.
    Telcel is the best for 4g and internet service.
    Mexico cellphone company's
    http://www.telcel.com/portal/home.doTelcel: Excellent coverage, You'll have to present your passport. It took no time set up the data service. (You need to know their APN settings for data service I will cover this below. I used The Vonage app to Talk to friends and family in the U.S for free they were able to call and text me while using the Vonage app on their smart phone and toll free numbers work with Vonage but not with the Mexico number.(I will cover how to set up Vonage before your travel below). There are other cheaper company's but none with the same coverage as Telcel. It worked everywhere compared to the company below.
    http://www.movistar.com.mx/Movistar: The underdog. Cheaper per-month. It is what The other phone used.I wanted to test both networks. The rate to call the USA from Mexico was only 2 pesos per minute (15 cents) but there are other options to call the U.S for free as stated above. Coverage is not great at all, but it wasn't to terrible either. It was really spotty while on the beach unlike Telcel. Traveling out of Cancun on a excursions there was next to none cellular service at all. A lot of the small towns didn't have Movistar coverage. You will end up roaming on a different network it will roam on the Telcel network instead yeah that's right I said Telcel.
    Prices
    Everyone wants to use their Android phone or iPhone for checking emails, translating Spanish and occasionally consulting Google Maps while lost. It is easy to setup data on your phone once you have a SIM card and money on the account. If you don't explicitly buy data you can still use data on your device, but it will be taken out of your account balance at a very expensive rate. The best thing to do is to sign up for a package deal. Movistar is $200 pesos ($15) for 1GB which expires in 1 month. If your stay is not long Telcel offers the same 1GB data service for 10 days.
    To sign up for one of these packages after you have added money to your Movistar account you send a text message to a special number and money is automatically taken from your account balance to pay for your data package. For example, to sign up for 1GB over 30 days, a $200 peso plan, you send a text message to 100 that says "30 dias". $200 pesos will be removed from your Movistar account and you'll have a gig of data to use.
    Telcel works in a different way but you don't not need to text any special number( if your purchase from their main Store) after you add money to your account. it is automatically applied only when you use any OXXO convenience store to refill your mobile service then you will need to text a special number which will be provided . I prefer going to Telcel company just in case of a language barrier.
    Note: That all Telcel prepaid plans are currently referred to as "Amigo". Click Here for Telcel Rate Rates are in pesos not dollars
    Your sim card good and can be reused up too 1 year after money runs out or time expires.
    Current Exchange rate $1 USD = 13.2408 pesos.
    Step 2
    Lets get your internet service running :
    After you have your sim and paid for data you need add the APN setting to your phone. I did have to add the APN to my Razr Maxx for 4G/3G coverage, As Same for the iPhone 4S to acquire the 3G data service. Insert your Telcel sim go to the one of the link below, click your phone software link. its free no need to pay a company which will take you minutes to do. If your phone is running any Android you click the android manual setup for Iphone the Iphone manual setup. Here is Telcel APN setting for Cancun, Mexico . Here is Movistar APN settings
    Note: If you have a fully unlocked smartphone that is not locked to any specific carrier in the United States, Canada or any other country you may not have to enter the APN setting manually.
    How to Call and Text to the U.S and Receive Calls and Text from the U.S while abroad at no Charge.
    I have used Vonage for a while to me its the best. I have used on trips to Europe and it has always work without any problems.
    When setting up Vonage you must do it before your trip abroad because it will asked for your current U.S number for authorization and activation this number will not change once you use a foreign sim since your account is linked to your U.S number not your carrier.
    You can add money to your Vonage account if you are planing on calling land lines or a smartphone with out the Vonage app attached to that smartphone number. (I notice a few times I used Vonage from Mexico to call a mobile phone that did not have Vonage, I was able to call them for free, which was a bonus). You can Call, send SMS and MMS threw Vonage at no additional charge to any smartphone with the Vonage app.
    There are other apps out there that do work the same way as Vonage. Viber, Call and Text any Viber user for free. Whatsapp a texting app only no calling is available (yet).
    These apps will use the data service you have purchase while abroad or if you have WiFi enable on your phone if WiFi is available they will use the WiFi Data instead of Cellular Data. Almost every Hotel in Cancun makes you pay for WiFi. If you are at a hotel that offers free WiFi you are in luck but the service may be spotty in some areas in your hotel.
    Note to reader: The Hotspot for Verizon Wireless did not work it will look for Verizon servers. I will update this article when I find a Hotspot for Telcel. I also know The Foxfi app did not work either even the paid version.
    Thanks for reading !!
    Enjoy your trip.

    How to turn your computer into a Virtual (Personal)Router.
    Our hotel the Grand Oasis Cancun provided internet for only 36 hours and you could only use it on one device which comes to my next option as using your Laptop as a Personal Router to broadcast WiFi to any devices near your computer. Our room was on the Second level of the Pyramid at Grand Oasis and I was able to access it while at the VIP lounge below our room. Before our supposedly free internet service ended.
    I attempted using the hotel next door since I was getting a good signal from the Omni Hotel. They offered complimentary 24hr internet access using your browser as a way to track your use. Once you find the signal of the Omni it will open your browser I used Google Chrome, after it opens you go threw a few simple steps and your ready.
    I learned that after the 24 hours are up all you have to do is disconnect from their network, just run Ccleaner(free program) then find the Signal of the hotel and you will be given another 24 hours. What Ccleaner(<--download there) does is clears anything attached to your browser ie cookies temp files etc. it cleans your browser history giving you a way of not paying for the hotel fee of internet and giving you free WiFi. this is only if you are next to the Omni hotel :).
    What you need to download to turn your computer into a hotspot need to say is this little easy to use program Virtual Router. Once it has download test at your home to make sure it works with you devices. This will work with Tablets, Phones and other computers that cant find the Omni WiFi signal. Your welcome. To use it, is simple. Open program>make a password>select WiFi and start VR.

Maybe you are looking for

  • System Overload & How to get the best G4 Performance

    Okay all you Logic and OSX Gurus. I need your help. I've finally made the LOGIC leap from OS9 and have hit the SYSTEM OVERLOAD wall like many of you before me. I've been pouring over this, and many other Forums and Blogs, for about two weeks now, and

  • How to print multiple fields in single barcodes

    Hello friends, How to create a single barcodes with multiple fields in smartforms and retrieve same multiple fields while scanning also. My requirement is, i want to create barcodes which contains material no, serial no, material description and quan

  • My presario b1900 only boots normally when a screen lid closed

    Hi im a compaq presario b1900 user and suddenly started to have a booting problem since i mistakenly closed the laptop lid in full while booting and opened it up right after. Then, my laptop only boots perfectly when the lid is almost closed under ro

  • Lightroom 4.4 will not import NEF RAW files from Nikon D610

    I shoot a Nikon D800 and have never had any issues importing my NEF RAW files into Lightroom. I borrowed a friend's Nikon D610 and shot a bunch of NEF RAW files. I downloaded them to my computer the same way I always do. For some reason, Lightroom wi

  • Issues with FW800 drive

    Not entirely sure if this is the correct forum, but it's sort of a general OS question. I had all my work (as a graphic designer) and my email on a FW400 drive, which I switch between my office workstation and my home-office workstation. Everything w