jsp动态标签包含include

<jsp:include page=""></jsp:include>

这个命令也是包含的关系但是和:

<%@ include file="/hel.jsp"%>

这种的不一样,下面这个属于静态包含,在运行的时候,Tomcat会把hei.jsp和lo.jsp合并成一个java文件,然后编译

但是上面这种的是属于调用,通过lo.jsp文件动态包含hei.jsp文件,如果:

	<jsp:include page="/hell.jsp?name=renliang"></jsp:include>

那么在hei.jsp中就能接受到传输的参数  从而显示出来 ,如:hei.jsp中的代码:

<%
		String name  = request.getParameter("name");
	%>
	<hr>
	<%=name %>
属于调用。。。

猜你喜欢

转载自blog.csdn.net/qq_39203959/article/details/79784480