Thanks Chuck and Jorge...

My English is not so great and maybe my questions did not had good
grammatical form. 
Chuck thanks for answer, and I know what cookie is :) but I was confused...
Just for practice I created two jsp, one calls another through form tag. And
after that I created one servlet who prints all cookies. Than for experiment
I run jsp A who on-click called (opens) jsp B, than after that I run servlet
C to print current cookies and it printed JSESSIONID cookie. 
I was confused what is relation between session (HttpSession) and JSESSIONID
cookie because JSESSIONID has "session" in it's name and through my
cookie-printing servlet I saw that JSESSIONID is cookie? And is there
in-memory cookie which generates on every get and post request? 
I thought that this "Tomcat in-memory (session) cookie" which I am looking
for is JSESSIONID. I could print it value but I was wondering could I change
it value? Or add more values to this cookie?
In manual Chuck gave me I found this: "Session tracking through HTTP cookies
is the most used session tracking mechanism and is required to be supported
by all servlet containers. The container sends a cookie to the client. The
client will then return the cookie on each subsequent request to the server,
unambiguously associating the request with a session. The name of the
session tracking cookie must be JSESSIONID." So after my all my dilemmas
JSESSIONID is simple cookie! But I still do not know is this the cookie
which exists only when browser is opened because I closed browser and run my
cookie-printing servlet which printed this cookie again?!
Jorge, thanks, you cleared some of my dilemmas but I still have few... :)
You said that through the HttpSession object I can access the cookies and
you said and that JSESSIONID attribute is handled by Tomcat but you said "It
is enough to add the attribute(s) you will later use." Does this means that
I can add more values to JSESSIONID cookie?!
If I can this is great, it solves my problem, I can check with my second
servlet is JSESSIONID present and I can check does it contains my value and
if it does I redirect, if it doesn't I inform user.

-- 
View this message in context: 
http://www.nabble.com/Tomcat-in-memory-%28session%29-cookie-tp22060645p22067923.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to