Can I set Cookies in Portlets? - Websphere

This is a discussion on Can I set Cookies in Portlets? - Websphere ; I have a requirement to set a cookie in Portlets, can I do that? Is it possible? I tried setting some cookie but I was not getting it.Your help is greatly appreciated. Thanks...

+ Reply to Thread
Results 1 to 8 of 8

Thread: Can I set Cookies in Portlets?

  1. Can I set Cookies in Portlets?

    I have a requirement to set a cookie in Portlets, can I do that? Is it possible? I tried setting some cookie but I was not getting it.Your help is greatly appreciated.



    Thanks

  2. Re: Can I set Cookies in Portlets?

    I dont think JSR168 portlet api supports adding a cookie.



    Gangadhar

  3. Re: Can I set Cookies in Portlets?

    Is there anyway to set cookies?

  4. Re: Can I set Cookies in Portlets?

    Writing out a <javascript>document.cookie = ""</javascript> comes to mind



    But thats a hack, no doubt about it.

  5. Re: Can I set Cookies in Portlets?

    I already tried this, but I have to set it in serverside..

  6. Re: Can I set Cookies in Portlets?

    Could you explain your requirement, so that we can think of an alternative.



    Gangadhar

  7. Re: Can I set Cookies in Portlets?

    I had already set some cookie in javascript by document.cookie=..., it works fine in IE, but when I tried

    accessing in Firefox there is no cookie,then i realized let me try with serverside so that it would resolve the issue, but not able to fetch the cookie that are set in serverside.



    Thanks in advance.

  8. Re: Can I set Cookies in Portlets?

    If I understood correctly.. It is some thing like this



    You must be thinking to store a server side user specific attribute to a permanent storage.



    And you want to retrive it for certain functionality when the user logs on again.



    If my understanding is correct then you can go for using PortletPreferences.



    Gangadhar

+ Reply to Thread