当前位置:编程学习 > JAVA >>

@page:重复出现

严重: Servletjsp的Servlet.service()发生意外(exception)
org.apache.jasper.JasperException: /header.jsp(1,1) @page:重复出现contentType 旧:text/html; charset=UTF-8,新: text/html; charset=gb2312
at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:405)
at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:234)
at org.apache.jasper.compiler.Validator$DirectiveVisitor.visit(Validator.java:127)
at org.apache.jasper.compiler.Node$PageDirective.accept(Node.java:549)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
at org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
at org.apache.jasper.compiler.Validator$DirectiveVisitor.visit(Validator.java:94)
at org.apache.jasper.compiler.Node$IncludeDirective.accept(Node.java:597)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
at org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
at org.apache.jasper.compiler.Validator.validate(Validator.java:1452)
at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:166)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:276)
at org.apache.jasper.compiler.Compiler.compile(Compiler.java:264)
at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:563)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:305)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:88)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:619)
header.jsp的代码
<%@ page contentType="text/html; charset=gb2312"%>
<table width="780" border="0" cellspacing="0" align="center">
<tr>
<td background="${pageContext.request.contextPath}/images/bodybg.jpg">
<br>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
<td width="283"><img src="${pageContext.request.contextPath}/images/struts2.png" width="188" height="66"></td>
<td width="246"><img src="${pageContext.request.contextPath}/images/spring.gif" width="152" height="66"></td>
<td width="243"><img src="${pageContext.request.contextPath}/images/hibernate.png" width="203" height="56"></td>
  </tr>
</table>
</td>
  </tr>
  <tr>
<td height="68" background="${pageContext.request.contextPath}/images/bodybg.jpg"><p align="center" class="pt9">
  All Rights Reserved.© <a href="http://www.crazyit.org">http://www.crazyit.org</a><br/>
  版权所有 Copyright©2008 Yeeku.H.Lee <br/>
如有任何问题和建议,请登录<a href="http://www.crazyit.org">http://www.crazyit.org</a><br/>
建议您使用1024*768分辨率,IE5.0以上版本使用本系统!</p>
</td>
  </tr>
  <tr height="5"><td background="${pageContext.request.contextPath}/images/bottom.jpg"></td></tr>
</table>

--------------------编程问答-------------------- 清下服务器缓存,重编译下这个页面 --------------------编程问答--------------------
补充:Java ,  Java EE
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,