Cookie across Domains


EJB design: Cookie across Domains

  1. Cookie across Domains (3 messages)

    Can any one share the solution, if you come across the below problem.

    Here is the scenario:
    am using apache tomcat,

    1. Access a domain X and set a value to the cookies and set to response in action class.

    2 So Cookie will be reside in browser.

    3 Again access domain 'Y'

    4 Can i send the cookie which i got in the step 2 to the domain 'Y'.

    Can any one help me in this regard.
    If chance can mail me at

    Threaded Messages (3)

  2. Cookie across Domains[ Go to top ]

    Yes,you can do that by creating a cookie object using the following construct.
    Cookie(String name, String value, String domain, String path, Date expires, boolean secure).

    Also class Cookie provide many useful method.
  3. Cookie across Domains[ Go to top ]

    I'm afraid you can not!!
    Because the cookie sent to you server side is commited by you brower,if you access domain Y,the brower will not commit the cookie of domain X!
  4. Yes correct[ Go to top ]

    Yes u cann't pass the cookie across the domains.

    Thanks for responses - Hari