Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

cookies and domains problem ?

 
Ranch Hand
Posts: 223
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • 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
  • 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
  • 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
  • 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
  • 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..
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic