You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Ben Bookey <be...@gistec-online.de> on 2004/09/24 10:48:27 UTC
Using request.getLocale() inside of the sessionListener event
Dear List,
We are using a sessionlistener to count users. Is it possible for us to
use the request object somehow inside of the sessionCreated event? We want
to determine the client.locale and then store this in the session object.
This would therefore mean, we can determine the language GUI interface to
sue once for a session, and
not in the'header' of every jsp page.
To me there doesnt seem a way to use the request object in this
sessionCreated event ?
I would really appreciate any help!
regards
BEn
import javax.servlet.http.HttpSessionListener;
import javax.servlet.http.HttpSessionEvent;
public void sessionCreated(HttpSessionEvent e) {
...
count users
}
public void sessionDestroyed(HttpSessionEvent e) {
count users
}
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
Re: Using request.getLocale() inside of the sessionListener event
Posted by Tim Funk <fu...@joedog.org>.
No. The request is not accessible inside the sessionevent.
What you probably need to do is write a filter that sets that value in the
session (if a session exists).
-Tim
Ben Bookey wrote:
> Dear List,
>
> We are using a sessionlistener to count users. Is it possible for us to
> use the request object somehow inside of the sessionCreated event? We want
> to determine the client.locale and then store this in the session object.
> This would therefore mean, we can determine the language GUI interface to
> sue once for a session, and
> not in the'header' of every jsp page.
>
> To me there doesnt seem a way to use the request object in this
> sessionCreated event ?
>
> I would really appreciate any help!
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org