这是demo1.jsp
<%@ page contentType="text/html;charset=gb2312"%>
<html>
<body>
<%! int i=0;%>
<%
i++;
%>
<%="第"%>
<%=i%>
<%="次"%><jsp:include page="index.jsp">
<jsp:param name="p1" value="我是参数,我传递过来了"/>
<jsp:include>
</body>
</html>这是被包含的index.jsp<html>
<body>
<center>Now time is: <%=new java.util.Date()%></center>
<% String s;%> <%
s=request.getParameter("p1");
%>
<%=s%>
</body>
</html>
我运行demo1的时候出现错误了:
HTTP Status 500 -
type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception org.apache.jasper.JasperException: /demo1.jsp(14,0) Expecting "jsp:param" standard action with "name" and "value" attributes
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:88)
org.apache.jasper.compiler.Parser.parseParam(Parser.java:827)
org.apache.jasper.compiler.Parser.parseBody(Parser.java:1665)
org.apache.jasper.compiler.Parser.parseOptionalBody(Parser.java:1004)
org.apache.jasper.compiler.Parser.parseInclude(Parser.java:856)
org.apache.jasper.compiler.Parser.parseStandardAction(Parser.java:1118)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1448)
org.apache.jasper.compiler.Parser.parse(Parser.java:133)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:216)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:167)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.14 logs.
<%@ page contentType="text/html;charset=gb2312"%>
<html>
<body>
<%! int i=0;%>
<%
i++;
%>
<%="第"%>
<%=i%>
<%="次"%><jsp:include page="index.jsp">
<jsp:param name="p1" value="我是参数,我传递过来了"/>
<jsp:include>
</body>
</html>这是被包含的index.jsp<html>
<body>
<center>Now time is: <%=new java.util.Date()%></center>
<% String s;%> <%
s=request.getParameter("p1");
%>
<%=s%>
</body>
</html>
我运行demo1的时候出现错误了:
HTTP Status 500 -
type Exception reportmessage description The server encountered an internal error () that prevented it from fulfilling this request.exception org.apache.jasper.JasperException: /demo1.jsp(14,0) Expecting "jsp:param" standard action with "name" and "value" attributes
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:40)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:407)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:88)
org.apache.jasper.compiler.Parser.parseParam(Parser.java:827)
org.apache.jasper.compiler.Parser.parseBody(Parser.java:1665)
org.apache.jasper.compiler.Parser.parseOptionalBody(Parser.java:1004)
org.apache.jasper.compiler.Parser.parseInclude(Parser.java:856)
org.apache.jasper.compiler.Parser.parseStandardAction(Parser.java:1118)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1448)
org.apache.jasper.compiler.Parser.parse(Parser.java:133)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:216)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:167)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:306)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:286)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:273)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:566)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.14 logs.
楼主【huyanqieyu】截止到2008-07-22 10:36:42的历史汇总数据(不包括此帖):
发帖的总数量:60 发帖的总分数:980 每贴平均分数:16
回帖的总数量:17 得分贴总数量:3 回帖的得分率:17%
结贴的总数量:52 结贴的总分数:820
无满意结贴数:11 无满意结贴分:151
未结的帖子数:8 未结的总分数:160
结贴的百分比:86.67 % 结分的百分比:83.67 %
无满意结贴率:21.15 % 无满意结分率:18.41 %
楼主加油
<jsp:param name="p1" value="我是参数,我传递过来了"/>
</jsp:include>
少个/
<jsp:include page="index.jsp">
<jsp:param name="p1" value="我是参数,我传递过来了"/>
</jsp:include>