title: HTTP 500 javax.servlet.ServletException: file not found
body: <p>I'm developping a J2EE application that works fine when run from eclipse, but when I deploy it on tomcat I get the following exception, I don't understand what's wrong cause I need to refresh several times until the page is displayed</p>
  
  <p>(eclipse returns empty file when trying to export war, so I deploy by copying all the files in WebContent in tomcat/webapps/my project, and I copy classes in my WEB-INF)</p>
  
  <pre><code>Etat HTTP 500 - javax.servlet.ServletException: Le fichier &amp;quot;/menu_dashboard_top.jsp&amp;quot; n'a pas été trouvé
  
  javax.servlet.ServletException: Le fichier &amp;quot;/menu_dashboard_top.jsp&amp;quot; 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)
  </code></pre>
  
  <p>menu_dashboard_top.jsp is in WebContent, it's not a servlet just a jsp page that contains the menu that I include in all my web pages</p>
  
  <p>I have mapped all my servlets in web.xml. Here is my web.xml file</p>
  
  <pre><code> &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;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"&gt;
    &lt;display-name&gt;e-declaration&lt;/display-name&gt;
    &lt;welcome-file-list&gt;
      &lt;welcome-file&gt;index.jsp&lt;/welcome-file&gt;
    &lt;/welcome-file-list&gt;
    &lt;servlet&gt;
      &lt;servlet-name&gt;register&lt;/servlet-name&gt;
      &lt;servlet-class&gt;servlet.register&lt;/servlet-class&gt;
    &lt;/servlet&gt;
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;register&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/register&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
    &lt;servlet&gt;
      &lt;servlet-name&gt;login&lt;/servlet-name&gt;
      &lt;servlet-class&gt;servlet.login&lt;/servlet-class&gt;
    &lt;/servlet&gt;
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;login&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/login&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
    &lt;servlet&gt;
      &lt;servlet-name&gt;logout&lt;/servlet-name&gt;
      &lt;servlet-class&gt;servlet.logout&lt;/servlet-class&gt;
    &lt;/servlet&gt;
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;logout&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/logout&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
    &lt;servlet&gt;
      &lt;servlet-name&gt;profil&lt;/servlet-name&gt;
      &lt;servlet-class&gt;servlet.profil&lt;/servlet-class&gt;
    &lt;/servlet&gt;
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;profil&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/profil&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
    &lt;servlet&gt;
      &lt;servlet-name&gt;impotg50&lt;/servlet-name&gt;
      &lt;servlet-class&gt;servlet.impotg50&lt;/servlet-class&gt;
    &lt;/servlet&gt;
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;impotg50&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/impotg50&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
    &lt;servlet&gt;
      &lt;servlet-name&gt;aimpotg50&lt;/servlet-name&gt;
      &lt;servlet-class&gt;servlet.aimpotg50&lt;/servlet-class&gt;
    &lt;/servlet&gt;
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;aimpotg50&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/aimpotg50&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
    &lt;servlet&gt;
      &lt;servlet-name&gt;declaration&lt;/servlet-name&gt;
      &lt;servlet-class&gt;servlet.declaration&lt;/servlet-class&gt;
    &lt;/servlet&gt;
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;declaration&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/declaration&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
    &lt;servlet&gt;
      &lt;servlet-name&gt;dashboard&lt;/servlet-name&gt;
      &lt;servlet-class&gt;servlet.dashboard&lt;/servlet-class&gt;
    &lt;/servlet&gt;
    &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;dashboard&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/dashboard&lt;/url-pattern&gt;
    &lt;/servlet-mapping&gt;
    &lt;filter&gt;
      &lt;filter-name&gt;Set Character Encoding&lt;/filter-name&gt;
      &lt;filter-class&gt;org.apache.catalina.filters.SetCharacterEncodingFilter&lt;/filter-class&gt;
      &lt;init-param&gt;
        &lt;param-name&gt;encoding&lt;/param-name&gt;
        &lt;param-value&gt;UTF-8&lt;/param-value&gt;
      &lt;/init-param&gt;
      &lt;init-param&gt;
        &lt;param-name&gt;ignore&lt;/param-name&gt;
        &lt;param-value&gt;false&lt;/param-value&gt;
      &lt;/init-param&gt;
    &lt;/filter&gt;
    &lt;filter-mapping&gt;
      &lt;filter-name&gt;Set Character Encoding&lt;/filter-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
    &lt;/filter-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>