• Post Reply Bookmark Topic Watch Topic
  • New Topic

Session

 
Joseph Sweet
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,

A question to you:

When I call a servlet, does the container create a session object automatically (I mean, if I do not use sessions at all in my code)???

How about a JSP page???

If there is a session header in my request, does the container do something about it (if I do not use sessions at all in my code)???


Thanks.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Servlets do not automatically create a session; JSPs do, but you can turn that off by putting "<%@ page session="false" %>" in the page.

What session header are you talking about? Web apps handle sessions through cookies or URL rewriting, not HTTP headers.
 
Joseph Sweet
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks.

I mean, usually sessions are managed by cookies, and as far as I know cookies are managed by cookie headers which are html headers.
 
Ulf Dittmer
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're right, cookies are managed through HTTP (not HTML) headers.
 
Joseph Sweet
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you, HTTP of course.

Should go to bed earlier
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!