jsp中实现页面转发
方式1:
pageContext.forward(“转发页面”);
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>Title</title>
</head>
<body>
<%
pageContext.forward("");
%>
</body>
</html>
方式2:
request.getRequestDispatcher(“转发页面”).forward(request,response);
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>Title</title>
</head>
<body>
<%
request.getRequestDispatcher("转发页面").forward(request,response);
%>
</body>
</html>