早教吧作业答案频道 -->其他-->
HTTPStatus500错误HTTPStatus500---------------------------------------------------------------------------------typeExceptionreportmessagedescriptionTheserverencounteredaninternalerror()thatpreventeditfromfulfillingthisreques
题目详情
HTTP Status 500 错误
HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException:Unable to compile class for JSP:
An error occurred at line:18 in the jsp file:/test_jsp.jsp
Cannot invoke write(String) on the primitive type void
15:}
16:Date now1=new Date();
17:out.println("执行后时间:"+DateFormat.getTimeInstance().format(now1)+"
");
18:out.println("程序总共循环了:"+count+"次
");
19:%>
20:
21:
An error occurred at line:18 in the jsp file:/test_jsp.jsp
Syntax error on tokens,delete these tokens
15:}
16:Date now1=new Date();
17:out.println("执行后时间:"+DateFormat.getTimeInstance().format(now1)+"
");
18:out.println("程序总共循环了:"+count+"次
");
19:%>
20:
21:
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:317)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.
--------------------------------------------------------------------------------
Apache Tomcat/6.0.18
以下是源代码;
测试JSP运行时间
HTTP Status 500 -
--------------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException:Unable to compile class for JSP:
An error occurred at line:18 in the jsp file:/test_jsp.jsp
Cannot invoke write(String) on the primitive type void
15:}
16:Date now1=new Date();
17:out.println("执行后时间:"+DateFormat.getTimeInstance().format(now1)+"
");
18:out.println("程序总共循环了:"+count+"次
");
19:%>
20:
21:
An error occurred at line:18 in the jsp file:/test_jsp.jsp
Syntax error on tokens,delete these tokens
15:}
16:Date now1=new Date();
17:out.println("执行后时间:"+DateFormat.getTimeInstance().format(now1)+"
");
18:out.println("程序总共循环了:"+count+"次
");
19:%>
20:
21:
Stacktrace:
org.apache.jasper.compiler.DefaultErrorHandler.javacError(DefaultErrorHandler.java:92)
org.apache.jasper.compiler.ErrorDispatcher.javacError(ErrorDispatcher.java:330)
org.apache.jasper.compiler.JDTCompiler.generateClass(JDTCompiler.java:423)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:317)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.
--------------------------------------------------------------------------------
Apache Tomcat/6.0.18
以下是源代码;
测试JSP运行时间
▼优质解答
答案和解析
你太不小心了, 有两个错误:
1.你没有设置编码,你的页面里有中文,而默认的ISO-8859-1并不符合.所以你应该在第一行加入一句
2.你的程序:out.println("程序总共循环了:"+count+"次
");
最后一个分号看见了吗?你改成英文符号的";",而不能用中文的";".
1.你没有设置编码,你的页面里有中文,而默认的ISO-8859-1并不符合.所以你应该在第一行加入一句
2.你的程序:out.println("程序总共循环了:"+count+"次
");
最后一个分号看见了吗?你改成英文符号的";",而不能用中文的";".
看了 HTTPStatus500错...的网友还看了以下:
设f(x,y)在(0,0)处连续,limx,y→0f(x,y)-1ex2+y2-1=4,则()A. 2020-05-14 …
讨论:关于如何求卷积x(t)*h(-t)的积分表达式?以前信号与系统里学过了x(t)*h(t)的表 2020-06-06 …
T(n)=2T(n-1)+n,n>0;T(0)=0.求T(n)谢谢了,大神帮忙啊T(n)=2T(n 2020-06-08 …
设f(x)在(-∞,+∞)内可导,且F(x)=f(x^2-1)+f(1-x^2),证明F'(1)= 2020-06-15 …
设函数f(x)连续,且f(0)≠0,求极限limx→0∫x0(x?t)f(t)dtx∫x0f(x? 2020-07-09 …
当x∈[0,4]求定积分∫1/(1+√x)dx设√x=t则t∈[0,2]dx=2tdt原式=2∫t 2020-07-23 …
1.集合P={x|x2-1=0},T={-1,0,1},则P与T的关系为()A.PTB.PTC.P 2020-08-01 …
有方程怎么做出曲线来!有这么两个方程y=6.34[1-e^-0.2372(t+0.4045)]其中 2020-08-02 …
已知速度曲线v(t)上的四个数据点下表所示t=0.15:0.01:0.18;v(t)=[3.5,1. 2020-12-23 …
△=0,△<0时一元二次方程ax2+bx+c=0(a>0)的根根需要用字母代表出来△>0,△=0,△ 2020-12-27 …