jsp页面逻辑判断引入页面

jsp引入页面的3个方式


1.jstl import  <c:import url="inlayingJsp.jsp"></c:import> 

2.jsp include指令 <%@ include file="inlayingJsp.jsp" %>  

3.jsp include动作  <jsp:include   page="inlayingJsp.jsp" flush="true"/>  



系统中用到的为第2种方式,增加逻辑判断

<%if(1>2){ %>
<%@include file="/menu1.jsp"%>
<%}else{ %>
<%@include file="/menu2.jsp"%>
<%}%>

猜你喜欢

转载自blog.csdn.net/shangshanling/article/details/74212145