requires that an attribute name is preceded by whitespace异常总结

在tomcat7.0下,会报一个异常:

org.apache.jasper.JasperException: /head.jsp(1,84) The JSP specification requires that an attribute name is preceded by whitespace

head.jsp我是用<jsp:include page="head.jsp" flush="true"/>引入的,在tomcat6.0的环境下,不会报以上的异常,但在tomcat7.0会报这个异常,后来,仔细查了一下head.jsp文件第一行。原来我真的漏了一个空格,

<%@ page language="java" contentType="text/html; charset=UTF-8"pageEncoding="UTF-8"%>

在pageEncoding之前漏了一个空格。改正,重新运行,ok了!

你可能感兴趣的:(apache,html,jsp)