Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

glassfish auto-generates unwanted session

 
Jonh Smith
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Somehow glassfish seems to be generating a session for me, even without my explicit request.

I set up a small "dynamic web project" with eclipse, with a single jsp to show the problem, which consists in the http response containing a set-cookie for the jsessionid. I have no request.getSession() call or equivalent in my code. Can someone explain what is going on here and tell me how to disable it ?

jsp (disregard the fact that it uses scripplets and not EL/JSTL...)



web.xml


sun-web.xml (generated by eclipse)


result:




Thank you in advance.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is the default behavior for JSPs.
It's part of the JSP spec, not something specific to Glassfish.

Look at the <%@ page ...> directive documentation to see how to disable this.


See:
http://java.sun.com/products/jsp/tags/11/syntaxref11.fm7.html
 
Jonh Smith
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you very much for your help Ben!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic