日期:2014-05-18  浏览次数:20697 次

出现HTTP Status 500 - 错误是怎么回事
代码如下:

<%@   page   contentType= "text/html;charset=gb2312 "
              import= "Java.util.*%>
<HTML>
<HEAD> <TITLE> welcome </TITLE> </HEAD>
<BODY>
<%/*定义变量*/%>
<%!String   AuthorName= "方逵 ";%>
<jsp:include   page= "hello.jsp "   flush= "true "/>
<%
Date   dd=new   Date();
out.println( "感谢你阅读本书 <BR> ");
out.println( "本书的作者是: ");
%>
<%--输出作者的名字--%>
<%=AuthorName%>
<%//下面输出系统的时间%>
<%

out.println( "现在时间是: "+dd.toLocaleString());
%>
</BODY>
</HTML>

放在了   ROOT目录下了    


页面提示如下:
type   Exception   report

message  

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

exception  

org.apache.jasper.JasperException:   /welcome.jsp(7,24)   equal   symbol   expected
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.parseAttribute(Parser.java:195)
org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:150)
org.apache.jasper.compiler.Parser.parsePageDirective(Parser.java:343)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:465)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1426)
org.apache.jasper.compiler.Parser.parse(Parser.java:133)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:215)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:102)
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:308)
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.10   logs.


------解决方案--------------------
应该不是放在ROOT目录下,和ROOT同目录,在webapps目录下
------解决方案--------------------
包名错了

import= "Java.util.*%> ==> import= "java.util.*%>

我的异常网推荐解决方案:The server encountered an internal error () that prevented it from fulfilling this request.,http://www.aiyiweb.com/java-web/317.html