JSP中实现301重定向的代码

2013-08-293lian11 的分享   加三联MM小编微信好友:sanlian2018

如一页面article.JSP中实现301重定向:

<%@ page language="Java" contentType="text/HTML; charset=UTF-8" pageEncoding="UTF-8"%>
<%
response.setStatus(HttpServletResponse.SC_MOVED_PERMANENTLY);   
response.setHeader("Location","/other.jsp");

return;
%>

推荐

TA发布的帖子

608

收藏

605