public class AddInterceptor {
public View dispose(HttpServletRequest request, HttpServletResponse response, HandlerChain chain) {
HttpSession session = request.getSession();
String name = (String)session.getAttribute("name");
if(name == null) {
return new StaticFileView("/index.html");
}
return chain.doNext(request, response, chain);
}