2 个解决方案
#1
public class TestServlet extends HttpServlet {
public void doPost(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
resp.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
}
}
#2
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
response.setHeader("Location","/other.jsp");
return;
%>
随带一个连接http://www.diybl.com/course/4_webprogram/jsp/jsp_js/20091125/183440.html
<%
response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
response.setHeader("Location","/other.jsp");
return;
%>
随带一个连接http://www.diybl.com/course/4_webprogram/jsp/jsp_js/20091125/183440.html
#1
public class TestServlet extends HttpServlet {
public void doPost(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
resp.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
}
}
#2
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
response.setHeader("Location","/other.jsp");
return;
%>
随带一个连接http://www.diybl.com/course/4_webprogram/jsp/jsp_js/20091125/183440.html
<%
response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);
response.setHeader("Location","/other.jsp");
return;
%>
随带一个连接http://www.diybl.com/course/4_webprogram/jsp/jsp_js/20091125/183440.html