动作:include--进行包含页面 动作:param--用来进行页面参数传递
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
<title>Title</title>
</head>
<body>
动作:include--进行包含页面
动作:param--用来进行页面参数传递
<hr>
<jsp:include page="被包含页面.jsp">
<jsp:param name="msg" value="send message success"/>
<jsp:param name="email" value="313370741@qq.com"/>
<jsp:param name="address" value="chengdu"/>
</jsp:include>
</body>
</html>
被包含页面.jsp
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div>
这里是通过动作include被被包含进来的内容<br/>
动作元素在请求处理阶段执行
</div>
<hr>
<%
request.setCharacterEncoding("utf-8");
String email = request.getParameter("email");
String msg = request.getParameter("msg");
String address = request.getParameter("address");
%>
<div>
<table>
<tr>
<td>email</td>
<td>msg</td>
<td>address</td>
</tr>
<tr>
<td><%= email %></td>
<td><%= msg %></td>
<td><%= address %></td>
</tr>
</table>
</div>
显示效果: