当前位置: 代码迷 >> JavaScript >> JSP顶用include标签动态引入其它文件报错:attribute for %>" is not properly terminated
  详细解决方案

JSP顶用include标签动态引入其它文件报错:attribute for %>" is not properly terminated

热度:780   发布时间:2012-09-04 14:19:30.0
JSP中用include标签动态引入其它文件报错:attribute for %>" is not properly terminated

<jsp:include?page="<%=uri?%>/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="<%=uri?%>"></jsp:include>?两个引号与<%=uri?%>之间不能有空格

?

?

?

  相关解决方案