title: URL localhost:8080/<project_name>/Servlet don't works
body: <p>I'm trying to run my simple servlet "Hello".<br>
  I have installed tomcat 9.0.6<br>
  Than i create a new JavaEE web project in Idea (called test)... after i create new package in src (called servlet), after new servlet file "myServlet".<br>
  <a href="https://i.stack.imgur.com/we5ZJ.png" rel="nofollow noreferrer">Project Structure</a><br>
  Here is code:</p>
  
  <pre><code>public class myServlet extends HttpServlet {
  protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
      response.setContentType("text/html");
  
      PrintWriter out = response.getWriter();
  
      out.println("&lt;html&gt;&lt;body&gt;");
  
      out.println("&lt;h2&gt;Hello my first Servlet&lt;/h2&gt;");
      out.println("&lt;br/&gt;");
      out.println("Time on the server is: " + new java.util.Date());
  
      out.println("&lt;/body&gt;&lt;/html&gt;");
  }
  
  
  protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
      doGet(request, response);
  }
  </code></pre>
  
  <p>Than i open web.xml and add next lines for servlet and servlet-mapping:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd"
       version="4.0"&gt;
  &lt;servlet&gt;
      &lt;servlet-name&gt;myServlet&lt;/servlet-name&gt;
      &lt;servlet-class&gt;servlet.myServlet&lt;/servlet-class&gt;
  &lt;/servlet&gt;
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;myServlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/myServlet&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>After successfully running tomcat ("Artifact is deployed successfully") i try to visit url: <a href="http://localhost:8080/test/myServlet" rel="nofollow noreferrer">http://localhost:8080/test/myServlet</a>   <br> Result was page 404... <br>But if i change url to: <a href="http://localhost:8080/myServlet" rel="nofollow noreferrer">http://localhost:8080/myServlet</a> <br> result was correct.<br>
  <a href="https://i.stack.imgur.com/bMAJw.png" rel="nofollow noreferrer">Result</a>
  <br>
  What's wrong with url: <a href="http://localhost:8080/test/myServlet" rel="nofollow noreferrer">http://localhost:8080/test/myServlet</a> ???<br>
  Need some libraries or what ??? <br>
  Where is my mistake ???
  <br><br>
  Also i try with @WebServlet("/myServlet") annotation without servlet and servlet-mapping lines in web.xml  - result the same.</p>