JSP传递参数与接受参数

动作元素:(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");
%>

猜你喜欢

转载自blog.csdn.net/wangctes/article/details/89047889
今日推荐