本文介绍Servlet中的重定向, 重定向中会自动携带Cookie。
Get
1 | public static void doGetRedirect(HttpServletRequest request, HttpServletResponse response, String url) throws IOException{ |
Post
1 | public static void doPostRedirect(HttpServletRequest request, HttpServletResponse response, String url){ |