public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException
{
System.out.println(" !!!! Filter @@ Invokes !!!! ");
HttpServletRequest req = (HttpServletRequest)request;
HttpServletResponse resp = (HttpServletResponse)response;
HttpSession session = req.getSession(false);
if (session != null) {
chain.doFilter(req, resp);
} else {
resp.sendRedirect("index.jsp");
}
}