翻译成中文:JSP规范要求属性名称前面有空白。
报错全文信息:
type Exception report
message /foreground/common/link.jsp (line: 1, column: 84) The JSP specification requires that an attribute name is preceded by whitespace
description The server encountered an internal error that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: /foreground/common/link.jsp (line: 1, column: 84) The JSP specification requires that an attribute name is preceded by whitespace
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:42)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:408)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:89)
org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:164)
org.apache.jasper.compiler.Parser.parseAttributes(Parser.java:183)
org.apache.jasper.compiler.ParserController.getPageEncodingForJspSyntax(ParserController.java:479)
org.apache.jasper.compiler.ParserController.determineSyntaxAndEncoding(ParserController.java:420)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:190)
org.apache.jasper.compiler.ParserController.parseDirectives(ParserController.java:119)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:193)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:373)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:353)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:340)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:646)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:357)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:954)
org.apache.jsp.index_jsp._jspService(index_jsp.java:89)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)```
源码:
<%@ page language="java" contentType="text/html; charset=UTF-8"pageEncoding="UTF-8"%>
<div class="row-fluid">
<div class="span12">
<div class="link">
<div class="linkHeader">友情链接</div>
<div class="datas">
<ul>
<li><a href="http://www.baidu.com" target="_blank">百度</a></li>
<li><a href="http://www.oschina.net" target="_blank">开源中国</a></li>
<li><a href="http://www.java1234.com" target="_blank">Java1234</a></li>
<li><a href="2" target="_blank">超链7</a></li>
<li><a href="http://www.csdn.com" target="_blank">CSDN</a></li>
<li><a href="" target="_blank">超链2</a></li>
<li><a href="" target="_blank">超链3</a></li>
<li><a href="" target="_blank">超链4</a></li>
<li><a href="" target="_blank">超链5</a></li>
</ul>
</div>
</div>
</div>
</div>
最后发现pageEncoding连在一起导致,按下空格一下,问题解决了