HTTP状态500 -
输入例外报告
消息
description服务器遇到内部错误(),导致无法完成此请求。
例外
org.apache.jasper.JasperException: /Game.jsp(65,117) quote symbol expected
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:41)
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:222)
org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:162)
org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:153)
org.apache.jasper.compiler.Parser.parseGetProperty(Parser.java:900)
org.apache.jasper.compiler.Parser.parseStandardAction(Parser.java:1132)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1449)
org.apache.jasper.compiler.Parser.parse(Parser.java:138)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:239)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:102)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:197)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:372)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:352)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:339)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:594)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:344)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.12 logs.
Apache Tomcat/7.0.12
以下是我试图运行的JSP文件的代码:
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style>
table, th, td {
border: 1px solid black;
border-collapse: collapse;
}
button {
align : center;
height: 45px;
width: 45px;
background-color:red;
}
.bombButton{
align : center;
height: 45px;
width: 45px;
background-color:red;
}
</style>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js">
$(".bombButton").click(function(){
$("button").attr('disabled','disabled');
$(".bombButton").html("<b>B</b>");
});
</script>
<jsp:useBean id="Mine" class = "MineBean" scope="session" ></jsp:useBean>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Mine Sweeper</title>
</head>
<body>
<div>
<br>
<br>
<br>
<br>
<br>
<button type ="submit" ></button>
<br>
<br>
<br>
<br>
<br>
</div>
<table style ="width:35% " align = "center" >
<% for( int i=0; i<10; i++) { %>
<tr >
<% for( int j=0; j<10; j++) {
Integer box_no = i*10+j;
String id =null ;
id = "i"+box_no.toString();
%>
<td >
<button id = <% out.print(id); %> type="button" class=<jsp:getProperty name="Mine" property="bombExists" param=<% out.print(box_no); %> />>
<%out.print(i*10+j); %></button><!---->
</td>
<% } %>
</tr>
<% } %>
</table>
</body>
</html>
答案 0 :(得分:0)
这是应该指出问题原因的部分:
org.apache.jasper.JasperException: /Game.jsp(65,117) quote symbol expected
它告诉你,在第65行的Game.jsp和字符117中,引用是预期的。所以可能会有拼写错误。
<强>更新强>
getProperty只有两个属性:name和property。属性param仅与setProperty一起使用。