动态包含JSP页面的问题
两个非常简单的JSP页面:
Category_Guide.jsp:
<HTML>
<HEAD>
<TITLE> Category_Guide </TITLE>
</HEAD>
<BODY>
<a href="showcategory.jsp">基础理论</a>
</BODY>
</HTML>
showcategory.jsp:
<HTML>
<HEAD>
<TITLE> Show Category </TITLE>
</HEAD>
<BODY>
<jsp:include page="Category_Guide.jsp" flush="true">
</jsp:include>
showcategory
</BODY>
</HTML>
为什么编译不可以,错误如下
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: /showcategory.jsp(10,1) Expected "param" tag with "name" and "value" attributes
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:83)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:402)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:126)
org.apache.jasper.compiler.Parser.parseParam(Parser.java:892)
org.apache.jasper.compiler.Parser.parseBody(Parser.java:1838)
org.apache.jasper.compiler.Parser.parseOptionalBody(Parser.java:1100)
org.apache.jasper.compiler.Parser.parseInclude(Parser.java:928)
org.apache.jasper.compiler.Parser.parseStandardAction(Parser.java:1251)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1597)
org.apache.jasper.compiler.Parser.parse(Parser.java:171)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:247)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:149)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:135)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:237)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:456)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:552)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:291)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:248)
javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
note The full stack trace of the root cause is available in the Tomcat logs.
实际上如果showcategory包含别的页面也不好使,为什么呢,谢谢!