为了账号安全,请及时绑定邮箱和手机立即绑定

页面跳转为什么出错

这下面两个是两个jsp 页面的代码,,请问为什么在tomcat下运行出错了

<%@ page language="java" contentType="text/html; charset=gb2312" %> 

<html>

<body bgcolor=cyan>

<font size=5>

<%String str= request.getParameter("number");

double n=Double.parseDouble(str);%>

<p>你传过来的数值是:</p><br />

<%=n%>

</font>

</body>

</html>


<%@ page language="java" contentType="text/html; charset=gb2312" %> 

<html>

<body>

<%double i=Math.random();%>

 <jsp: forward page="come.jsp">

 <jsp: param name="number" value="<%=i%>"/>

 </jsp:forward>

 </body>

 </html>

报错:

type Exception report

message /pages/lianxi/example2_13.jsp (line: 5, column: 6) Invalid standard action

description The server encountered an internal error that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: /pages/lianxi/example2_13.jsp (line: 5, column: 6) Invalid standard action
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:41)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:275)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:91)
org.apache.jasper.compiler.Parser.parseStandardAction(Parser.java:1158)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1459)
org.apache.jasper.compiler.Parser.parse(Parser.java:139)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:227)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:100)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:199)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:356)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:336)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:323)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:585)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:363)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

note The full stack trace of the root cause is available in the Apache Tomcat/8.0.32 logs.


请求解答,谢谢


正在回答

举报

0/150
提交
取消
JSP常用标签
  • 参与学习       46088    人
  • 解答问题       80    个

配置及使用常用JSTL标签,这是一项必备的基本技能

进入课程

页面跳转为什么出错

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信