日期:2014-05-17  浏览次数:20744 次

org.apache.jasper.JasperException: /jsp/room/../message.jsp(1,3) Page directive:
org.apache.jasper.JasperException: /jsp/room/../message.jsp(1,3) Page directive: illegal to have multiple occurrences of contentType with different values (old: text/html; charset=UTF-8, new: text/html; charset=UTF-8 )

这个错误比较简单,单就从字面上来看,错误就已经很明朗了,比如我这里就是room.jsp有这么一行代码:<%@include file="/message.jsp"%>,然后这两个页面的text/html; charset=UTF-8这句代码位置不对。所以只要把它们搞成位置一致就可以了。
1 楼 cancan7 2012-04-10  
org.apache.jasper.JasperException: /upload.jsp(10,1) Page directive must not have multiple occurrences of pageencoding
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:102)
org.apache.jasper.compiler.Validator$DirectiveVisitor.visit(Validator.java:194)
org.apache.jasper.compiler.Node$PageDirective.accept(Node.java:590)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2428)
org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2434)
org.apache.jasper.compiler.Node$Root.accept(Node.java:475)
org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2376)
org.apache.jasper.compiler.Validator.validateDirectives(Validator.java:1749)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:194)
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:342)
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)