PerShing2014 / jmesa

Automatically exported from code.google.com/p/jmesa
0 stars 0 forks source link

No way to create a servlet web request context without using a session #218

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The HttpServletWebRequestContext constructor calls request.getSession(),
which creates a new session if one does not exist.

The only purpose for doing this on construction of the context is to grab
the servlet context without having it explicitly passed in.

My application has a session listener to monitor the requirement that no
HttpSession is created, which is triggered when trying to render a JMesa
table (even if I am not using the state feature or anything).

Attached is a patch that provides an alternate constructor to
HttpServletRequestWebContext that allows the servlet context to be passed
in explicitly, avoiding a call to getSession() unless session access is
actually necessary (ie, setSessionAttribute is called or something like that).

Original issue reported on code.google.com by bgo...@e1b.org on 14 Sep 2009 at 6:43

Attachments:

GoogleCodeExporter commented 8 years ago
Thanks! I will take a look at this early this week...I have two other patches 
that I
need to do as well so your timing is good.

Original comment by jeff.johnston.mn@gmail.com on 15 Sep 2009 at 4:31

GoogleCodeExporter commented 8 years ago
That looks fine to me! It is checked into the trunk.

Original comment by jeff.johnston.mn@gmail.com on 16 Sep 2009 at 12:39