HTTP状态500 - 找不到javax.servlet.ServletException文件

时间:2014-05-09 05:35:06

标签: java jsp struts

我面临异常HTTP Status 500 - javax.servlet.ServletException: File "/common/IncludeGoogleKey.jsp" not found

查看该系统无法找到文件“/common/IncludeGoogleKey.jsp”,其中使用语句<jsp:include page="/common/IncludeGoogleKey.jsp" />来包含文件,文件位于所提及的位置,当我点击页面属性时按下Ctrl键(如使用eclipse)IDE将我带到该文件,这意味着文件存在于正确的位置,但是当我刷新网页时它会给出异常。

修改 webapps/AppName/common/IncludeGoogleKey.jsp是需要包含的文件,其中

webapps/AppName/PVS/P_Search.jsp是包含include语句的文件。

完整跟踪是

May 09, 2014 1:28:12 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet [action] in context with path [/appName] threw exception [javax.servlet.ServletException: File &quot;/common/IncludeGoogleKey.jsp&quot; not found] with root cause
javax.servlet.ServletException: File &quot;/common/IncludeGoogleKey.jsp&quot; not found
    at org.apache.jasper.servlet.JspServlet.handleMissingResource(JspServlet.java:412)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:392)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:690)
    at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:599)
    at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:536)
    at org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:954)
    at org.apache.jsp.PVS.Partner_005fSearch_jsp._jspService(Partner_005fSearch_jsp.java:290)
    at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
    at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
    at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:690)
    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:477)
    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)
    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)
    at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1069)
    at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:455)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:279)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at com.mind.common.CharsetEncoding.doFilter(CharsetEncoding.java:36)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at com.googlecode.psiprobe.Tomcat60AgentValve.invoke(Tomcat60AgentValve.java:30)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
    at org.apache.catalina.authenticator.SingleSignOn.invoke(SingleSignOn.java:336)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
    at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1653)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

3 个答案:

答案 0 :(得分:2)

片段“ /common/IncludeGoogleKey.jsp ”应出现在:

/&LT;的 WEB_Project_Name &GT; /的WebContent /  公共/ IncludeGoogleKey.jsp

确保IncludeGoogleKey.jsp位于上方位置。

答案 1 :(得分:0)

有类似的问题 - 代码刚刚停止在Servlet-to-JSP转发上工作。

  

org.apache.jasper.JasperException:javax.servlet.ServletException:java.lang.StackOverflowError

如何修复它:

  • 退出IDE(我使用IDEA)
  • 重新打开IDE
  • 如果你有红色的东西 - 按“重新导入所有Maven项目”(因为我使用Maven)

答案 2 :(得分:0)

公用文件夹必须移至WEB-INF目录。该语句的编辑如下(我使用IntelliJ IDEA):

 <jsp:include page="WEB-INF/common/IncludeGoogleKey.jsp" />