redirect « Security « JSP-Servlet Q&A

1. Http response - redirect and authenticate

I need to redirect to a URL that needs a basic authentication. I managed to redirect (But that way I get the popup asking for user/password)

protected void doGet(HttpServletRequest request, HttpServletResponse response)

2. redirect after timeout

3. Basic Authentication Servlet Redirect

4. help with jsp redirection after timeout

Hi all i am looking for help into 2 things; how to redirect users to a logout page automatically when the session expires, (i have a lot of jsp/html pages in this web-app, can this be done through tomcat maybe aka globally) and/or when a user clicks on a link in a page but his session has expired how to redirect ...