String.jsp

<%@ page contentType="text/html" pageEncoding="UTF-8"%>
<html>
<head><title>传参数页面</title></head>
<body>
<h4>该页面传递一个参数QQ,直线下是接受参数页面的内容</h4>
<hr>
<jsp:include page="Output.jsp">
<jsp:param value="userName" name="QQ"/>
</jsp:include>
</body>
</html>

Output.jsp

<%@ page contentType="text/html" pageEncoding="UTF-8"%>

<html>
<head><title>接受参数页面</title> </head>

<body>
接受参数,并显示结果页面 <br>
<%String str=request.getParameter("userName"); %>
<font color="blue" size="12" > <%=str %></font>你好,欢迎你访问!
</body>
</html>