instead of just providing 

if(request.getSession(false).getAttribute("locale") == null)

provide

if(request.getSession(false) == null ||
request.getSession(false).getAttribute("locale") == null) {
  //redirect
}

i hope this will work

vishnu.vyasan wrote:
> 
> Hi Friends,
> 
>  
> 
> How can I forward to a login page on session Timeout?  Will struts
> create a Default session?
> 
>  
> 
> I am checking for a value of a locale variable set to default session on
> my JSP page. After   
> 
>  
> 
>    if(request.getSession(false).getAttribute("locale") == null){
> 
>  
> 
> //redirect to another page
> 
> }
> 
>  
> 
> But this is some how not working and after a session time out when I am
> trying to access the locale variable its giving a null pointer
> exception.
> 
>  
> 
> Regards
> 
> Vishnu Nv
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/How-to-handle-a-Session-Timeout-using-struts-1.3--tp25200423p25200496.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to