hi folks!
i've a question. if i use setDomain() on the cookie tell
which one would be the correct answer.
Cookie c = new Cookie("test","testCookie");
c.setDomain(".foo.com");
options:
1. www.foo.com
2. a.b.foo.com
(this is from the Java Servlet API but i want to make sure that i understand it correctly)
my answer is (1). is that right? 'coz for the cookie to be visible to (2) we need
to have DNS as b.foo.com. am i right or missing something?
so this presicely means its only the domain which we specify to which the cookie is visible.
it is not visible to the internal servers as well. (in above example we have two servers,
one main server with www.foo.com and another subserver-like my.yahoo.com- a.b.foo.com).
please thro some light on this. also let me know any other important thing need to be keep in mind regarding this...
regards
maulin
i've a question. if i use setDomain() on the cookie tell
which one would be the correct answer.
Cookie c = new Cookie("test","testCookie");
c.setDomain(".foo.com");
options:
1. www.foo.com
2. a.b.foo.com
(this is from the Java Servlet API but i want to make sure that i understand it correctly)
my answer is (1). is that right? 'coz for the cookie to be visible to (2) we need
to have DNS as b.foo.com. am i right or missing something?
so this presicely means its only the domain which we specify to which the cookie is visible.
it is not visible to the internal servers as well. (in above example we have two servers,
one main server with www.foo.com and another subserver-like my.yahoo.com- a.b.foo.com).
please thro some light on this. also let me know any other important thing need to be keep in mind regarding this...
regards
maulin