jsp_include.jsp页面:
<%@ include file="static.html" %>
<% // 静态包含只是把文件包含进来! %>
<a href="action.jsp">goto two ——></a>
<br>
<!-- 超链接转到action.jsp 文件和动态包含该文件显示是不同的 -->
this examples show include works!
<br>
<!-- 动态包含文件并传递参数 -->
<jsp:include page="action.jsp" flush="true">
<jsp:param name="a1" value="<%=request.getParameter("name") %>"/>
<jsp:param name="a2" value="<%=request.getParameter("password") %>"/>
</jsp:include>>
static.html页面:
<body>
<form method="post" action="jsp_include.jsp">
<table>
<tr>
<td>please input your name:</td>
<td><input type="text" name="name"></td>
</tr>
<tr>
<td>input your password:</td>
<td><input type="password" name="password"></td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="login"></td>
</tr>
</table>
</form>
</body>
action.jsp页面:
this is a1=<%=request.getParameter("a1") %>
<br>
this is a2=<%=request.getParameter("a2") %>
<br>
<% out.println("hello from action.jsp"); %>
jsp_includ.jsp出错为:
请各位亲们看一下怎么改才能正常运行!