title: tomcat server and HTTP status 404 - Not found
body: <p>i've just started with javaee and when i run this
  url:
  <a href="http://localhost:8089/test/toto" rel="nofollow noreferrer">http://localhost:8089/test/toto</a>
  i just get this error:
  HTTP status 404 - Not found 
  Type: Status report 
  message: /test/WEB-INF/test.jsp
  description: The requested resource is not available.</p>
  
  <blockquote>
    <p>the test.java isin my project com.sdzee.servlets.Test on java rsc</p>
  </blockquote>
  
  <p>and my web.xml is on web-inf folder 
  and my test.jsp is on the folder webContent.
  would you please help me.</p>
  
  <blockquote>
    <p>test.java</p>
  </blockquote>
  
  <pre><code>  package com.sdzee.servlets;
  
  import java.io.IOException;
  import java.io.PrintWriter;
  
  import javax.servlet.ServletException;
  import javax.servlet.http.HttpServlet;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  
  public class Test extends HttpServlet {
      public void doGet( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException{
  
          /*response.setContentType("text/html");//pour préciser au client que nous allons lui envoyer une page HTML,
          response.setCharacterEncoding( "UTF-8" );
          PrintWriter out = response.getWriter();
          out.println("&lt;!DOCTYPE html&gt;");
          out.println("&lt;html&gt;");
          out.println("&lt;head&gt;");
          out.println("&lt;meta charset=\"utf-8\" /&gt;");
          out.println("&lt;title&gt;Test&lt;/title&gt;");
          out.println("&lt;/head&gt;");
          out.println("&lt;body&gt;");
          out.println("&lt;p&gt;Ceci est une page générée depuis une servlet. helloooooooo&lt;/p&gt;");
          out.println("&lt;/body&gt;");
          out.println("&lt;/html&gt;");*/
  
          //String paramAuteur = request.getParameter( "auteur" );
          //String message = "Transmission de variables : OK ! " + paramAuteur;
          this.getServletContext().getRequestDispatcher( "/WEB-INF/test.jsp" ).forward( request, response );
  
      }
  }
  </code></pre>
  
  <p>web.xml:</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://java.sun.com/xml/ns/javaee"
   xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" 
   id="WebApp_ID" version="3.0"&gt;
  
      &lt;servlet&gt;
          &lt;servlet-name&gt;Test&lt;/servlet-name&gt;
          &lt;servlet-class&gt;com.sdzee.servlets.Test&lt;/servlet-class&gt;
      &lt;/servlet&gt;
  
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;Test&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/toto&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  
  
  &lt;/web-app&gt;
  </code></pre>
  
  <p>test.jsp:</p>
  
  <pre><code>&lt;%@ page language="java" contentType="text/html; charset=UTF-8"
      pageEncoding="UTF-8"%&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta charset="UTF-8"&gt;
  &lt;title&gt;test&lt;/title&gt;
  &lt;/head&gt;
      &lt;p&gt; page généré depui jsp&lt;/p&gt;
      &lt;p&gt;
              &lt;%  
              String attribut = (String) request.getAttribute("test");
              out.println( attribut );
              %&gt;
          &lt;/p&gt;
  &lt;body&gt;
  
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>and this is what appears on the consol when starting the tomcat server:</p>
  
  <pre><code>avr. 18, 2020 5:14:08 AM org.apache.catalina.startup.VersionLoggerListener log
  INFOS: Version du serveur:        Apache Tomcat/7.0.100
  avr. 18, 2020 5:14:08 AM org.apache.catalina.startup.VersionLoggerListener log
  INFOS: Serveur compilé:       Feb 11 2020 08:31:12 UTC
  avr. 18, 2020 5:14:08 AM org.apache.catalina.startup.VersionLoggerListener log
  INFOS: Version du serveur:      7.0.100.0
  avr. 18, 2020 5:14:08 AM org.apache.catalina.startup.VersionLoggerListener log
  INFOS: Nom de l'OS:           Windows 10
  avr. 18, 2020 5:14:08 AM org.apache.catalina.startup.VersionLoggerListener log
  INFOS: Version de l'OS:        10.0
  avr. 18, 2020 5:14:08 AM org.apache.catalina.startup.VersionLoggerListener log
  INFOS: Architecture:          amd64
  avr. 18, 2020 5:14:08 AM org.apache.catalina.startup.VersionLoggerListener log
  INFOS: Répertoire de Java:     C:\Program Files\Java\jre1.8.0_231
  avr. 18, 2020 5:14:08 AM org.apache.catalina.startup.VersionLoggerListener log
  INFOS: Version de la JVM:           1.8.0_231-b11
  avr. 18, 2020 5:14:08 AM org.apache.catalina.startup.VersionLoggerListener log
  INFOS: Fournisseur de la JVM:            Oracle Corporation
  avr. 18, 2020 5:14:08 AM org.apache.catalina.startup.VersionLoggerListener log
  INFOS: CATALINA_BASE:         C:\Users\amani\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
  avr. 18, 2020 5:14:08 AM org.apache.catalina.startup.VersionLoggerListener log
  INFOS: CATALINA_HOME:         C:\apache-tomcat-7.0.100
  avr. 18, 2020 5:14:08 AM org.apache.catalina.startup.VersionLoggerListener log
  INFOS: Argument de la ligne de commande: -Dcatalina.base=C:\Users\amani\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0
  avr. 18, 2020 5:14:08 AM org.apache.catalina.startup.VersionLoggerListener log
  INFOS: Argument de la ligne de commande: -Dcatalina.home=C:\apache-tomcat-7.0.100
  avr. 18, 2020 5:14:08 AM org.apache.catalina.startup.VersionLoggerListener log
  INFOS: Argument de la ligne de commande: -Dwtp.deploy=C:\Users\amani\eclipse-workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps
  avr. 18, 2020 5:14:08 AM org.apache.catalina.startup.VersionLoggerListener log
  INFOS: Argument de la ligne de commande: -Djava.endorsed.dirs=C:\apache-tomcat-7.0.100\endorsed
  avr. 18, 2020 5:14:08 AM org.apache.catalina.startup.VersionLoggerListener log
  INFOS: Argument de la ligne de commande: -Dfile.encoding=Cp1252
  avr. 18, 2020 5:14:08 AM org.apache.catalina.core.AprLifecycleListener lifecycleEvent
  INFOS: La librairie Apache Tomcat Native basée sur APR qui permet des performances optimales dans les environnements de production n'a pas été trouvée sur le java.library.path: [C:\Program Files\Java\jre1.8.0_231\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre1.8.0_231/bin/server;C:/Program Files/Java/jre1.8.0_231/bin;C:/Program Files/Java/jre1.8.0_231/lib/amd64;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\130\Tools\Binn\;C:\Program Files (x86)\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\Tools\Binn\;C:\Program Files\Microsoft SQL Server\140\DTS\Binn\;C:\Users\amani\AppData\Roaming\Dashlane\6.1946.0.26096\bin\Firefox_Extension\{442718d9-475e-452a-b3e1-fb1ee16b8e9f}\components;C:\Users\amani\AppData\Roaming\Dashlane\6.1946.0.26096\ucrt;C:\Users\amani\AppData\Roaming\Dashlane\6.1946.0.26096\bin\Qt;C:\Users\amani\AppData\Roaming\Dashlane\6.1946.0.26096\bin\Ssl;C:\Users\amani\Downloads\Compressed\eclipse-jee-2019-12-R-win32-x86_64\eclipse;;.]
  avr. 18, 2020 5:14:08 AM org.apache.coyote.AbstractProtocol init
  INFOS: Initialisation du gestionnaire de protocole ["http-bio-8089"]
  avr. 18, 2020 5:14:08 AM org.apache.catalina.startup.Catalina load
  INFOS: Initialization processed in 1717 ms
  avr. 18, 2020 5:14:08 AM org.apache.catalina.core.StandardService startInternal
  INFOS: Démarrage du service [Catalina]
  avr. 18, 2020 5:14:08 AM org.apache.catalina.core.StandardEngine startInternal
  INFOS: Starting Servlet Engine: Apache Tomcat/7.0.100
  avr. 18, 2020 5:14:10 AM org.apache.catalina.util.SessionIdGeneratorBase createSecureRandom
  AVERTISSEMENT: La création de l'instance de SecureRandom pour le générateur d'id de session en utilisant [SHA1PRNG] a pris [268] millisecondes
  avr. 18, 2020 5:14:10 AM org.apache.coyote.AbstractProtocol start
  INFOS: Démarrage du gestionnaire de protocole ["http-bio-8089"]
  avr. 18, 2020 5:14:10 AM org.apache.catalina.startup.Catalina start
  INFOS: Server startup in 1888 ms
  </code></pre>