Oh, sorry for the stupid question. Obviously, I haven't done raw servlet
programming for a while...

J.

On 27.04.2012 09:50, Martin Grigorov wrote:
 From HttpServletRequest javadocs:

HttpSession getSession()
Returns the current session associated with this request, or if the
request does not have a session, creates one.

Use getSession(false) instead.

To keep the page stateless you may use wicket-devutils
StatelessChecker in Dev mode.

On Fri, Apr 27, 2012 at 10:41 AM, Jürgen Lind<[email protected]>  wrote:
Hi,

I'm a bit confused with stateless pages and maybe somebody can shed light on
this...
I have a (currently) empty mounted WebPage that is later supposed to serve
as a
health-check page and will thus be called frequently. Now, if a do a simple
wget
with the page URL, my RequestCycleListener tells me, that a new session was
created.
I use the following code for this check:

    if (((ServletWebRequest)
RequestCycle.get().getRequest()).getContainerRequest().getSession()
        .isNew()) {
      logger.info("New session started");
    }

Now, since the page should not be bound to a session and will be called very
often, I would
rather not have the overhead of session creation for each request. Is there
something I am
missing?

Jürgen

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]






Mit freundlichen Grüßen,

Jürgen Lind

--
Dr. Jürgen Lind
iteratec GmbH                Fon: +49 (0)89 614551-44
Inselkammerstrasse 4         Fax: +49 (0)89 614551-10
82008 Unterhaching           Web: www.iteratec.de

Sitz und Registergericht der iteratec GmbH: München HRB 113 519
Geschäftsführer: Klaus Eberhardt, Mark Goerke, Inge Hanschke, Ralf Menzel

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to