动作元素:(strPath为请求路径,yourGet为参数)
<%
strPath += "?yourGet="+yourGet;
%>
<jsp:include page ="<%= strPath %>" />
等价于
<jsp:include page="<%= strPath %>">
<jsp:param name="yourGet" value="<%= yourGet %>"/>
</jsp:include>
接受参数:
<%
String paramVar=request.getParameter("yourGet");
%>
本文介绍如何在JSP中使用包含指令来加载另一个页面,并通过参数传递数据。展示了两种实现方式:一种是直接拼接请求路径并传递参数;另一种是使用jsp:param标签进行参数设置。
5714

被折叠的 条评论
为什么被折叠?



