title: doGet method is called twice in a servlet running in tomcat 7 and created with IntelliJ Idea 12
body: <p>I have created a simple servlet with only one System.out.println() method in doGet body, but when I am running it inside Tomcat 7 using IntelliJ Idea 12 I get the message that System.out.println() method prints twice.</p>
  
  <p>This is my web.xml :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;web-app xmlns="http://java.sun.com/xml/ns/javaee"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
            http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
             version="3.0"&gt;
  
      &lt;servlet&gt;
          &lt;description&gt;A simple servlet&lt;/description&gt;
          &lt;display-name&gt;SimpleServlet&lt;/display-name&gt;
          &lt;servlet-name&gt;SimpleServlet&lt;/servlet-name&gt;
          &lt;servlet-class&gt;org.skiabox.myservlet.SimpleServlet&lt;/servlet-class&gt;
      &lt;/servlet&gt;
  
      &lt;servlet-mapping&gt;
          &lt;servlet-name&gt;SimpleServlet&lt;/servlet-name&gt;
          &lt;url-pattern&gt;/SimpleServletPath&lt;/url-pattern&gt;
      &lt;/servlet-mapping&gt;
  &lt;/web-app&gt;
  </code></pre>
  
  <p>This is SimpleServlet.java :</p>
  
  <pre><code>package org.skiabox.myservlet;
  
  import javax.servlet.ServletException;
  import javax.servlet.http.HttpServlet;
  import javax.servlet.http.HttpServletRequest;
  import javax.servlet.http.HttpServletResponse;
  import java.io.IOException;
  
  public class SimpleServlet extends HttpServlet {
      protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
  
      }
  
      protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
          System.out.println("Hello from GET method.");
      }
  }
  </code></pre>
  
  <p>This is SimpleServletProject.iml :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;module type="JAVA_MODULE" version="4"&gt;
    &lt;component name="FacetManager"&gt;
      &lt;facet type="web" name="Web"&gt;
        &lt;configuration&gt;
          &lt;descriptors&gt;
            &lt;deploymentDescriptor name="web.xml" url="file://$MODULE_DIR$/web/WEB-INF/web.xml" /&gt;
          &lt;/descriptors&gt;
          &lt;webroots&gt;
            &lt;root url="file://$MODULE_DIR$/web" relative="/SimpleServletProject" /&gt;
          &lt;/webroots&gt;
        &lt;/configuration&gt;
      &lt;/facet&gt;
    &lt;/component&gt;
    &lt;component name="NewModuleRootManager" inherit-compiler-output="true"&gt;
      &lt;exclude-output /&gt;
      &lt;content url="file://$MODULE_DIR$"&gt;
        &lt;sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" /&gt;
      &lt;/content&gt;
      &lt;orderEntry type="inheritedJdk" /&gt;
      &lt;orderEntry type="sourceFolder" forTests="false" /&gt;
      &lt;orderEntry type="library" scope="PROVIDED" name="Tomcat 7.0" level="application_server_libraries" /&gt;
    &lt;/component&gt;
  &lt;/module&gt;
  </code></pre>
  
  <p>..and this is an image of Tomcat 7 settings :</p>
  
  <p><img src="https://i.stack.imgur.com/YbQwK.png" alt="Tomcat settings"></p>