• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

glassfish auto-generates unwanted session

 
Ranch Hand
Posts: 39
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you very much for your help Ben!
 
No, tomorrow we rule the world! With this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic