• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

cookies and domains problem ?

 
Ranch Hand
Posts: 223
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
i have 3 domains
http://www.mydomain.com
http://subdomain1.mydomain.com
http://subdomain2.mydomain.com

my servlet at http://subdomain1.mydomain.com is setting cookie like this

my servlets at http://www.mydomain.com is able to read the cookies set by http://subdomain1.mydomain.com but

servlets at http://subdomain2.mydomain.com is not able to read the cookie

please help
 
Ranch Hand
Posts: 298
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, I have not experimented on this. But I feel that its like one interface and two classes implementing this interface.

Or One base class and two sub-classes.

I hope you got my point.

Accessing the resources of sub-classes by a reference of Super-classes is possible. But access the resources of a sister class is not possible.
 
Ranch Hand
Posts: 167
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wonder if that is true. Cookie but its definition, should be readble from any URL from that domain. (.mydomain.com)
 
kapil munjal
Ranch Hand
Posts: 298
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, I think its right because domain and subdomain are different and cookies should not have access to sister domains.

Only the Base domain should have access to all the cookies of sub-domains.
 
Ranch Hand
Posts: 817
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by kapil munjal:

Accessing the resources of sub-classes by a reference of Super-classes is possible. But access the resources of a sister class is not possible.



a resources of sub-class be acessed by reference of super class only if super class has such methods... only for overriding..

guys i am not able to understand this setDomain concept ?
how does it work ? please tell me more..
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic