((WebRequest)getRequest()).getHttpServletRequest().getSession()

On Jan 18, 2010, at 10:12 PM, Apple Grew wrote:

> @Pedro
> 
> Thanks for the response. Now I have two questions.
> 
>   1. How do I get reference of HttpSession? In Wicket I seem to get
>   reference of WebSession.
>   2. How do I notify the servlet container (I guess Wicket is not in-charge
>   of maintaining the HttpSession), that the user is active? If I make any Http
>   request from client's end (AJAX), even if that request is simply ignored by
>   my application, will that help to keep the session alive?
> 
> 
> @Steve
> Yup this will be AJAX. When my solution is ready, will share it, definitely.
> :)
> 
> Regards,
> Apple Grew
> my blog @ http://blog.applegrew.com/
> 
> 
> On Tue, Jan 19, 2010 at 8:57 AM, Steve Swinsburg
> <[email protected]>wrote:
> 
>> Presumably, if the user is typing a long document and hasn't clicked on
>> anything for a while, you'll need to indicate to Wicket/HttpSession
>> (probably via AJAX), that the session is to be kept alive. I believe this is
>> how the autosave functions of things like rich text editors work, keeping
>> the session from timing out.
>> 
>> Interested to see your solution.
>> 
>> cheers,
>> Steve
>> 
>> 
>> 
>> On 19/01/2010, at 10:19 AM, Pedro Santos wrote:
>> 
>>> Use attributes from HttpSession like getLastAccessedTime() and
>>> getMaxInactiveInterval(). You can get access through WebRequest that
>> holds
>>> an HttpServletRequest object. When HttpSession ends, the wicket session
>> ends
>>> too.
>>> 
>>> 
>>> On Mon, Jan 18, 2010 at 5:33 PM, Apple Grew <[email protected]> wrote:
>>> 
>>>> Hi,
>>>> 
>>>> I am a Wicket fresher. I am still getting the hang of this.
>>>> 
>>>> I want to develop a web application where I would like to show the user
>> a
>>>> message informing him that his session is about to expire in x minutes.
>> If
>>>> he wants to save his session then can click on a button which appears
>> along
>>>> with this message.
>>>> 
>>>> Also, using javascript I would like to 'sense' that the user is
>> typing-in
>>>> or
>>>> moving his mouse over the webpage, which is evident enough that he is
>> using
>>>> the session.
>>>> 
>>>> I will somehow figure out the js code needed but *how will I tell Wicket
>> to
>>>> keep the session alive? Also how can I be notified x minutes before
>> Wicket
>>>> expires the session?*
>>>> 
>>>> Regards,
>>>> Apple Grew
>>>> my blog @ http://blog.applegrew.com/
>>>> 
>>> 
>>> 
>>> 
>>> --
>>> Pedro Henrique Oliveira dos Santos
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>> 
>> 


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

Reply via email to