![](http://hi.csdn.net/attachment/201202/19/0_13296598956394.gif)
<%@ page language="java" contentType="text/html;charset=UTF-8" %>
<%@page import="com.sun.corba.se.spi.protocol.ForwardException"%>
<html>
<head>
<title>包jsp文件并传递文件</title>
</head>
<body>
使用include包含一个参数,并传递,注意这里的jsp:include不能用"/>"
<jsp:include page="contentDemo.jsp">
<jsp:param name="age" value="19"/>
</jsp:include>
</body>
</html>
在contentDemo.jsp当中
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<h2>被包含页</h2>
<p>接受参数:</p>
<%
String strAge=request.getParameter("age");
%>
<%="age的值是"+strAge %>