JSP中用include标签动态引入其它文件报错

<jsp:include page="<%=path %>/include.jsp"></jsp:include> 

报错:attribute for %>" is not properly terminated 

原因:标签的page属性值可以是相对路径URL或者<%=表达式 %>,但同时只能存在其中一种

<jsp:include page="/frame/include.jsp"></jsp:include> 表示绝对路径

 <jsp:include page="frame/include.jsp"></jsp:include> 表示相对路径

<jsp:include page="<%=path %>"></jsp:include> 两个引号与<%=path%>之间不能有空格

posted @ 2013-10-15 11:34  tao5310  阅读(1164)  评论(0编辑  收藏  举报