did you bind the session? On Wed, Sep 29, 2010 at 6:52 PM, Alec Swan <[email protected]> wrote: > Hello, > > I decided to set MaxInactiveInterval to 0 in onAfterRender in order to > prevent guest sessions from expiring. So, my code looks like this: > > @Override > protected void onAfterRender() { > super.onAfterRender(); > ((ServletWebRequest) > this.getRequest()).getHttpServletRequest().getSession().setMaxInactiveInterval(0); > } > > However, this does not work because for some reason a new > getRequest().getHttpServletRequest().getSession().session object every time > onAfterRender() is called, e.g. if I refresh the page. > > Why am I getting StandardSession objects with different ids in > onAfterRender()? > > Thanks > > On Sat, Sep 18, 2010 at 9:39 AM, Martin Grigorov <[email protected]>wrote: > >> Wicket Session is stored in HttpSession. >> See >> >> http://download.oracle.com/docs/cd/E17802_01/products/products/servlet/2.5/docs/servlet-2_5-mr2/javax/servlet/http/HttpSession.html#setMaxInactiveInterval%28int%29 >> >> On Sat, Sep 18, 2010 at 5:30 PM, Alec Swan <[email protected]> wrote: >> >> > Are there any methods I can override in Wicket WebSession to make it >> never >> > expire? >> > >> > On Tue, Sep 14, 2010 at 10:25 PM, Martin Makundi < >> > [email protected]> wrote: >> > >> > > You can set session timeout per-session: >> > > >> > > ((ServletWebRequest) >> > > >> > > >> > >> request).getHttpServletRequest().getSession().setMaxInactiveInterval(seconds); >> > > >> > > ** >> > > Martin >> > > >> > > 2010/9/15 Jeremy Thomerson <[email protected]>: >> > > > On Tue, Sep 14, 2010 at 10:51 PM, Alec Swan <[email protected]> >> > wrote: >> > > > >> > > >> Isn't there a way to instruct Wicket not to create a session if the >> > user >> > > is >> > > >> not logged in? >> > > >> >> > > > >> > > > a session will always be created. it won't be bound (and therefore >> > > stored) >> > > > if you have all stateless pages - which isn't an easy task >> > > > >> > > > -- >> > > > Jeremy Thomerson >> > > > http://www.wickettraining.com >> > > > >> > > >> > > --------------------------------------------------------------------- >> > > To unsubscribe, e-mail: [email protected] >> > > For additional commands, e-mail: [email protected] >> > > >> > > >> > >> >
-- Become a Wicket expert, learn from the best: http://wicketinaction.com Apache Wicket 1.4 increases type safety for web applications Get it now: http://www.apache.org/dyn/closer.cgi/wicket/1.4.8 --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
