Delete http cookie in AbstractPortalComponent

Hi
1) I created a cookie in my custom login module.
          HttpSetterCallback setCookie = new HttpSetterCallback();
          setCookie.setType(HttpSetterCallback.COOKIE);
          setCookie.setName("MYCOOKIE");
          setCookie.setValue(cookieValue);
          cbSetter[2] = setCookie;
          ch.handle(cbSetter);
2) Then I want to read the cookie value and immediately delete the cookie in my portal component.
     public void doContent(IPortalComponentRequest request, IPortalComponentResponse response)
                                Cookie[] cookies = request.getServletRequest().getCookies();
          Cookie cookie = null;
          String value= "";
          for (int i = 0; i < cookies.length; i++)
               cookie = cookies<i>;
               if (cookie.getName().trim().equals("MYCOOKIE"))
                    value= cookie.getValue();
How do i delete the cookie after i get the value???
I have tried...but doesnt seem to work...
                    cookies<i>.setValue("");
                    cookies<i>.setMaxAge(0);
and also tried to overwrite it with a new value...but doesnt seem to work...
Cookie invalidateCookie = new Cookie("MYCOOKIE", "NONE");
response.addCookie(invalidateCookie);
request.getServletResponse(false).addCookie(invalidateCookie);
Edited by: K Ferguson on Nov 16, 2008 5:41 PM

Hi Ferguson,
Refer this thread related to the cookie problem.
Re: How to make sure the cookie is destroyed?
Regards
Supraja

Similar Messages

  • I have tried several ways to delete the cookies listed in options and nothing works to get rid of them.

    I have tried all of the methods to delete the cookies that are suggested on your support site. I have tried them if the selection in Options is for cookies allowed and with cookies not allowed. Also with 3rd party cookies allowed and not allowed. Normally, I have it set at cookies allowed but 3rd party cookies not allowed.
    I have tried CCleaner, Euslings Cleaner, Auglogics Cleaner, Wise Cleaner, SuperAntiSpyware, Spybot, and WinPatrol, plus deleting the temp files in Windows. All that software cleans out cookies. I also have Spyblaster set to protect against hundreds of tracking cookies. It was SuperAntiSpyware that brought the problem to my attention in the first place. It just started doing it approximately a few weeks ago but only the passed several days have I been working hard to get those cookies deleted. There must be a couple hundred of them. I did manage to delete about 5 or 6 of them but the others won't budge. I want to clean them all at and start from scratch and monitor them on a daily basis. I don't want most of them. SuperAntiSpyware claims it deletes them but when I go to Options in the browser they are still there. SuperAntiSpyware claims the cookies are there every time I run the program before shutting down the computer.
    I just added that Troubleshooter and looked at information. I'm sorry but I'm not understanding anything. I'm not that computer savvy.

    You may have installed an extension that adds so called opt-out cookies to Firefox.<br />
    Such opt-out cookies are send instead of the normal cookies and you can't remove such opt-out cookies unless you disable or uninstall the extension.
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance).
    *Do NOT click the Reset button on the Safe Mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • Some websites are saying I need to enable cookies when it is enabled already. I already tried deleting the cookie, deleting all cookies, clearing my cache, and uninstalling and reinstalling Firefox. How do I fix this?

    I am trying to access my school's library database. When I log in to access the library, it tells me that the site needs to verify me by sending me a cookie. There's a link to log in again, but when I click it, it says "404 not found". My privacy settings already have cookies enabled, and I tried deleting the cookie and revisiting the site but the same thing happens. I also tried uninstalling Firefox and reinstalling it, but that didn't work either. I am able to access the library on my iPod Touch, and I've tried other browsers on this compute and I can't access them on other browsers either. So it is clearly some issue with my computer that is preventing me from accessing this library. I don't know how else I can resolve this issue and I need to do so ASAP because my inability to access the library off campus is severely hampering my ability to get my work done.

    See:
    *http://kb.mozillazine.org/Cookies
    *http://kb.mozillazine.org/Websites_report_cookies_are_disabled

  • I think I updated to a newer version of firefox, I can no longer get into my gmail account . I can get onto google however. I deleted all cookies also. What have I done wrong? I didn't have this problem before.

    I can no longer get into my e-mail account on Google. I tried to update my version of Firefox. I also deleted all cookies in Google. When I click on Firefox, it opens to my Google home page. Then when I click on "gmail" it keeps repeating "redirecting" and does no more. What did I do wrong or forget? Help!

    check this
    https://support.mozilla.com/en-US/questions/835441#answer-200175
    Now try this solution
    https://support.mozilla.com/en-US/questions/836263#answer-201266
    Check and tell if its working.

  • Firefox doesn't delete my cookies when I clear all history.

    When I go to options and clear all history (everything, all boxes checked), firefox does not delete my cookies because I am still logged into accounts. Not too sure about deleting all my history and cache either.
    Is there a setting I am missing that bypasses certain accounts from getting deleted?

    Is this about "Clear history when Firefox closes" to clear the cookies when you close Firefox?
    If you leave tabs open when you exit Firefox then Firefox stores the cookies in sessionstore.js as part of the session data.
    You can set the <b>browser.sessionstore.privacy_level</b> pref to 2 (never) or 1 (non-HTTPS) on the <b>about:config</b> page to disable saving cookies via session restore.
    You can open the <b>about:config</b> page via the location bar
    *http://kb.mozillazine.org/about:config

  • Weather page stuck on initial date from the first time I opened it. Will not update. Have deleted history, cookies. Comics do not update either, still stuck on the original day I opened them after installing Firefox. Help Please

    Have updated all plug-ins and add-on. Not sure if this is related or not, when I tried to use "live chat" that link would not work.

    If you are using bookmarks to open the sites then make sure that you do not use bookmarks that have GET data appended (?xxx=xxx) to specify a specific page.
    * "Clear the Cache": Firefox > Preferences > Advanced > Network > Offline Storage (Cache): "Clear Now"
    * "Remove the Cookies" from sites causing problems: Firefox > Preferences > Privacy > Cookies: "Show Cookies"
    If clearing the cookies doesn't help then it is possible that the file <i>cookies.sqlite</i> that stores the cookies is corrupted.
    Rename (or delete) <b>cookies.sqlite</b (cookies.sqlite.old) and delete <b>cookies.sqlite-journal</b> and <b>cookies.txt</b>, if they exist, in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Profile Folder] in case cookies.sqlite got corrupted.

  • The wording on the delete/edit cookies menu is NOT GOOD...

    When I want to delete INDIVIDUAL cookies it is too easy to accidentally delete ALL cookies.
    Here's what should be changed...
    1) REWORD the button to the left. It now says, "Remove Cookies." It SHOULD say, "Remove SELECTED Cookie(S)."
    2) There should be a WARNING box, if one hits "Remove All Cookies" by accident. Another box should pop up that says, "Are you sure you want to remove ALL cookies? (this cannot be undone)"
    I hope FF reads this.
    (note: Yup -- I just deleted all cookies by accident)

    I use code in userChrome.css to remove all the Remove buttons and use the Delete key to remove (selected) items.
    Add code to the userChrome.css file below the default @namespace line.
    *http://kb.mozillazine.org/userChrome.css
    The customization files userChrome.css (interface) and userContent.css (websites) are located in the chrome folder in the user profile folder.
    *http://kb.mozillazine.org/Editing_configuration
    <pre><nowiki>@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
    /* Remove buttons in "(Don't) Remember Passwords" window */
    #removeSignon, #removeAllSignons {display:none!important}
    #removeReject, #removeAllRejects {display:none!important}
    /* Remove buttons in Cookies: "View Cookies" window */
    /* #privacyPrefs button[label="Clear Cookies Now"]{display:none!important}*/
    #CookiesDialog button#removeCookie {display:none!important}
    #CookiesDialog button#removeAllCookies {display:none!important}
    #PermissionsDialog button#removePermission {display:none!important}
    #PermissionsDialog button#removeAllPermissions {display:none!important}</nowiki></pre>

  • HT4061 Since downloading the Find my IPad I don't know how to delete the cookies I have left when opening an app.

    I download the find my IPAD app.  I have disabled it now, but find that when I try to delete the cookies, I get a whole different screen and don't know how to delete them. 

    Sync Your iOS Device with a New Computer Without Losing Data
    http://www.howtogeek.com/104298/sync-your-ios-device-with-a-new-computer-without -losing-data/
    Syncing to a "New" Computer or replacing a "crashed" Hard Drive
    https://discussions.apple.com/docs/DOC-3141
     Cheers, Tom

  • How can I permanently delete tracking cookies?

    I was alarmed to read the series in the series in the Wall Street Journal ( www.wsj.com/wtk ) about flash cookies, trackers, and beacons. I had always set my preferences (in Firefox) to not accept cookies, changing that only when I came to a site that required cookies (like Facebook), but then choosing the option to not accept 3rd-party cookies, changing my preferences after the visit, and deleting cookies.
    I installed the add-ons suggested by the WSJ and on this website (Adblock Plus, Better Privacy, Ghostery, PrivacyChoice TrackerWater, and Taco. There is nothing in my Library>Preferences>Macromedia file. I visited the Adobe website and followed their instructions to delete flash cookies. Yet I cannot get rid of the cookies!
    I tried this experiment: when not connected to the internet, with cookies turned off, I deleted all cookies, closed Firefox, and lo and behold, 150 cookies (yes, I counted them) had re-created themselves!
    How can I get rid of them permanently? Please don't give me any pablum about them being harmless, they help to streamline the ads being shown to me, etc. etc. I don't care about that. This is MY computer and I do not want anyone installing anything on it! It irks me that deleting cookies deletes the useful cookies -- cookies that I would chose to keep -- but keeps all these other ones.
    Please, if anyone knows, how can I permanently delete these cookies?

    Get the Add-on NoScript for Firefox.
    http://noscript.net/
    In addition, I always empty all cookies after a browsing session or at the end of the day. The worst is I have to log back in to some sites. You can't permanently eliminate the possibility of picking up a tracking cookie, but you can get rid of them if you pick one up. NoScript minimizes the chances of getting one, since you only allow the minimum scripts for a site to function. I suggest you start at the NS site and read about it. There's also a support forum which needs no registration. I won't have a lot of time today to explain much more.
    Here what you do to completely eliminate Flash cookies. This works.
    +"Delete your ~/Library/Preferences/Macromedia folder so you're starting from a clean, shared-object-free, slate.+
    +Next, in your web browser visit http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_man ager07.html and under the Global Privacy Settings, click the button labeled "always deny" then "confirm" to prevent Flash from watching you through your webcam or listening to you over the computer's microphone. Technically speaking this isn't necessary, but it seems like a prudent move if you don't like the idea of web sites accessing these resources. Don't bother changing anything else in the Settings Manager because the other stuff pretty much involves what and how much can get saved on your computer, and we're going to answer those questions entirely different means.+
    +Now navigate in the Finder back to your ~/Library/Preferences/Macromedia folder and and recursively lock every file and folder inside it. This should include macromedia.com/support/flashplayer/sys/settings.sol, macromedia.com/support/flashplayer/sys, macromedia.com/support/flashplayer, macromedia.com/support, macromedia.com/#SharedObjects/<random letters and numbers>, macromedia.com/#SharedObjects, and finally the macromedia.com folder itself.+
    +That's it!+
    +The cool thing about this is that Flash is convinced it can store this crap so everything works, but nothing is actually remembered by Flash. Or at least nothing is remembered between browser sessions. Flash apparently never tells sites attempting to store stuff that, even though storing is enabled, it doesn't actually work and nothing gets stored."+

  • After trying to delete my cookies so my password and username for a site doesn't come up automatically, it still does, how do I make this stop?

    I accidentally clicked "Remember Me" for a site. Now every time I go on that website, it automatically puts in my user name and password. i tried to delete my cookies because I saw that someone else had the same problem, but it didn't work for me. The user name and password are still coming up and I don't know how to get rid of them.

    *Click the (empty) input field on the web page to open the drop down list
    *Highlight an entry in the drop down list
    *Press the Delete key (on Mac: Shift+Delete) to remove it.
    *http://kb.mozillazine.org/Password_Manager
    *https://support.mozilla.com/kb/make-firefox-remember-usernames-and-passwords

  • When I try to delete a cookie; ANY cookie, FFx crashes.

    I recently got a rash of unfamiliar cookies, mostly containing the characters "ad". When I try to delete ANY cookie, even cookies I've deleted before, FFx crashes and takes all other windows with it. There are a LOT of these new cookies, 271 by count, and I usually have no more than eight. If I try "delete all", I get the same crash.

    Did you install an extension like TACO that adds opt-out cookies?
    * https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • They only way Google search works is if I delete all cookies in FF 4; how do I fix this?

    I had Google toolbar installed before upgrading to v 4; it survived the upgrage, but now re-directs me to their "safe" page and puts me in an endless loop of typing in the distorted letters. If I go to google.com, page comes up, but search function does not work. If I delete all cookies, everything works. Is there a fix for this, or is it a google problem?

    Clear the cache and the cookies from sites that cause problems.
    "Clear the Cache":
    * Tools > Options > Advanced > Network > Offline Storage (Cache): "Clear Now"
    "Remove the Cookies" from sites causing problems:
    * Tools > Options > Privacy > Cookies: "Show Cookies"
    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    * Don't make any changes on the Safe mode start window.
    * https://support.mozilla.com/kb/Safe+Mode
    * https://support.mozilla.com/kb/Troubleshooting+extensions+and+themes

  • If I delete all cookies and cache will I loose everything?

    My bank says I must delete all cookies, caches, and add-ons. What do I loose?

    I replied over here: https://support.mozilla.com/en-US/questions/834820

  • Always facing the "Not Responding" issue while launching the internet explorer 11. I have tried reset in advanced, deleting all cookies, history and all. But no result.

    Always facing the "Not Responding" issue while launching the internet explorer 11. I have tried reset in advanced, deleting all cookies, history and all. Also I did change the default site to https://www.google.com. But no result.
    Some times after some time, able click on new tab and did open any urls. But it is rare. Please help me on this issue. Because of this unable to work with QTP/UFT tool.
    I am getting on top of the screen the below error -
    Error on top the ie screen :
    res:/ieframe.dll/acr_error.htm#google.com,https://www.google.com/ - Internet Explorer (Not Responding)
    I am getting at the bottom of the screen the below error -
    Error at the bottom of the ie screen :
    A problem with this webpage caused Internet Explorer to close and reopen the tab.

    Hi,
    Please refer to the following link to troubleshoot this issue:
    http://msdn.microsoft.com/en-us/library/dn338138.aspx
    Check the browser add-ons
    Check the browser rendering mode
    Then, please also make sure to install latest Windows Updates which might address this issue.
    Update your anti-virus program and perform a security scan incase some virus cause this issue.
    Yolanda Zhu
    TechNet Community Support

  • How can i safely segregate certain cookies (such as my bank's) so that i can use the delete all cookies feature but preserve those cookies?

    how can i safely segregate certain cookies (such as my bank's) so that i can use the delete all cookies feature but preserve those cookies? windows xp, firefox 13.0.1

    You can't delete all cookies if you want to preserve some of them.
    You will have to let all cookies expire when you close Firefox and create an allow exception for cookies that you want to keep and only clear cookies manually and not via Clear Recent History.
    *Tools > Options > Privacy : History: [X] Clear history when Firefox closes > Settings
    *https://support.mozilla.org/kb/Clear+Recent+History
    You can also consider to access website in Private Browsing mode if you do not want to store data to disk form those websites.
    *https://support.mozilla.org/kb/Private+Browsing

Maybe you are looking for

  • Entries into Multicolumn Listbox/Safing Data in .txt-file

    Hello. I haven't found anything helpful for my problem or better to say problems. I have to do a task that I have no idea how to solve. It isn't helping that I was never good with programming. Here is what I have up till now: I want to write seven st

  • Standard PO with different delivery dates

    Hai All, Pls. clafiry my below query. e.g. my PR Qty may be 30 PC (in one line item) I want to create the PO in one line item with different delivery dates. Like: 10 PC 15.12.2008         10 PC 20.12.2008         10 PC 25.12.2008 Rams

  • Cannot Select 'Siebel Security' when configuring BI Publisher

    Hi, Background: I am (attempting!) to configure a new reporting server for Siebel.. On the BI Publisher Console, there exists the following screen, I can't seem to add a screenshot, but you navigate to it via: Admin > Security Configuration > section

  • Cannot uninstall FP11 Activex

    uninstall FP 11 says IE is running.  It is not running..cannot uninstall..Any suggestions

  • Array indexOf() Reference Error?

    Hello, I have these simple code lines and on line 20 I'm getting the error in the comment but I cant find the problem in my code   var directions      = [0,1,2,3];   var lockedDirection = 0;   var lastDirection   = 2; // sample code   switch (lastDir