public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException {
// TODO Auto-generated method stub
System.out.println("doFilter....start");
//chain.doFilter(request, response);
HttpServletRequest req =(HttpServletRequest) request;
HttpServletResponse res = (HttpServletResponse)response;
//重定向
res.sendRedirect(req.getContextPath()+"/middle.jsp");
//转发
//req.getRequestDispatcher("main.jsp").forward(req, res);
System.out.println("doFilter....end");
}
用的火狐浏览器,一直说输入的没有找到此网站,错误信息http 404 ,所以我后面的error.jsp都完全不起作用的。。
HansonQ
相关分类