HTTP 500 javax.servlet.ServletException:找不到文件

时间:2015-06-11 22:53:31

标签: java-ee servlets servletexception

我正在开发一个从eclipse运行时运行良好的J2EE应用程序,但是当我在tomcat上部署它时,我得到以下异常,我不明白我需要什么错误的原因刷新几次,直到显示页面

(eclipse在尝试导出war时返回空文件,所以我通过复制tomcat / webapps / my project中的WebContent中的所有文件进行部署,并在WEB-INF中复制类)

Etat HTTP 500 - javax.servlet.ServletException: Le fichier "/menu_dashboard_top.jsp" n'a pas été trouvé

javax.servlet.ServletException: Le fichier "/menu_dashboard_top.jsp" n'a pas été trouvé
org.apache.jasper.servlet.JspServlet.handleMissingResource(JspServlet.java:418)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:398)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:934)
org.apache.jsp.impotg50_jsp._jspService(impotg50_jsp.java:173)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:431)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:396)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:340)
javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
org.apache.catalina.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:108)

menu_dashboard_top.jsp在WebContent中,它不是一个servlet,只是一个包含我在所有网页中包含的菜单的jsp页面

我已经在web.xml中映射了所有的servlet。这是我的web.xml文件

 <?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_3_1.xsd" id="WebApp_ID" version="3.1">
  <display-name>e-declaration</display-name>
  <welcome-file-list>
    <welcome-file>index.jsp</welcome-file>
  </welcome-file-list>
  <servlet>
    <servlet-name>register</servlet-name>
    <servlet-class>servlet.register</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>register</servlet-name>
    <url-pattern>/register</url-pattern>
  </servlet-mapping>
  <servlet>
    <servlet-name>login</servlet-name>
    <servlet-class>servlet.login</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>login</servlet-name>
    <url-pattern>/login</url-pattern>
  </servlet-mapping>
  <servlet>
    <servlet-name>logout</servlet-name>
    <servlet-class>servlet.logout</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>logout</servlet-name>
    <url-pattern>/logout</url-pattern>
  </servlet-mapping>
  <servlet>
    <servlet-name>profil</servlet-name>
    <servlet-class>servlet.profil</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>profil</servlet-name>
    <url-pattern>/profil</url-pattern>
  </servlet-mapping>
  <servlet>
    <servlet-name>impotg50</servlet-name>
    <servlet-class>servlet.impotg50</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>impotg50</servlet-name>
    <url-pattern>/impotg50</url-pattern>
  </servlet-mapping>
  <servlet>
    <servlet-name>aimpotg50</servlet-name>
    <servlet-class>servlet.aimpotg50</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>aimpotg50</servlet-name>
    <url-pattern>/aimpotg50</url-pattern>
  </servlet-mapping>
  <servlet>
    <servlet-name>declaration</servlet-name>
    <servlet-class>servlet.declaration</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>declaration</servlet-name>
    <url-pattern>/declaration</url-pattern>
  </servlet-mapping>
  <servlet>
    <servlet-name>dashboard</servlet-name>
    <servlet-class>servlet.dashboard</servlet-class>
  </servlet>
  <servlet-mapping>
    <servlet-name>dashboard</servlet-name>
    <url-pattern>/dashboard</url-pattern>
  </servlet-mapping>
  <filter>
    <filter-name>Set Character Encoding</filter-name>
    <filter-class>org.apache.catalina.filters.SetCharacterEncodingFilter</filter-class>
    <init-param>
      <param-name>encoding</param-name>
      <param-value>UTF-8</param-value>
    </init-param>
    <init-param>
      <param-name>ignore</param-name>
      <param-value>false</param-value>
    </init-param>
  </filter>
  <filter-mapping>
    <filter-name>Set Character Encoding</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>
</web-app>

1 个答案:

答案 0 :(得分:0)

通过从头开始重新安装tomcat来修复它