title: stackoverflowerror when try to access web application
body: <p>I was trying to create simple web application.
  Here is my <code>web.xml</code></p>
  
  <pre><code>&lt;servlet&gt;
      &lt;servlet-name&gt;basicServlet&lt;/servlet-name&gt;
      &lt;servlet-class&gt;com.pack.BasicServlet &lt;/servlet-class&gt;
  &lt;/servlet&gt;
  
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;basicServlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>
  
  <p>This is my <code>index.jsp</code> that located in <code>webapp/WEB-INF/jsp</code></p>
  
  <pre><code>&lt;%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %&gt;
  &lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta charset="UTF-8"&gt;
          &lt;title&gt;Basic web page&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;h2&gt;Data provided by server:&lt;/h2&gt;
          &lt;p&gt;
              &lt;c:choose&gt;
                  &lt;c:when test="${ not empty message }"&gt;
                      &lt;h3&gt;${message}&lt;/h3&gt;
                  &lt;/c:when&gt;
                  &lt;c:otherwise&gt;
                      &lt;h3&gt;none&lt;/h3&gt;
                  &lt;/c:otherwise&gt;
              &lt;/c:choose&gt;
          &lt;/p&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>And this is my <code>servlet</code></p>
  
  <pre><code>public class BasicServlet extends HttpServlet {
  
      private IBasicService basicService;
  
      @Override
      public void init() throws ServletException {
          basicService = new BasicService();
      }
  
      @Override
      protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
          req.setAttribute("message", basicService.provideMessage());
          req.getRequestDispatcher("/jsp/index.jsp").forward(req, resp); // 23 line
      }
  }
  </code></pre>
  
  <p>I built a <code>war</code> and deployed it in tomcat. But when I try to access it I get long stack trace</p>
  
  <pre><code>javax.servlet.ServletException: Servlet execution threw an exception
  org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  com.pack.BasicServlet.doGet(BasicServlet.java:23)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
  org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  com.pack.BasicServlet.doGet(BasicServlet.java:23)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
  org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  com.pack.BasicServlet.doGet(BasicServlet.java:23)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
  org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  com.pack.BasicServlet.doGet(BasicServlet.java:23)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
  org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  com.pack.BasicServlet.doGet(BasicServlet.java:23)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
  org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  ...
  </code></pre>
  
  <p>with <code>root cause</code></p>
  
  <pre><code>java.lang.StackOverflowError
  com.pack.BasicServlet.doGet(BasicServlet.java:22)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:635)
  javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
  org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
  ....
  </code></pre>
  
  <p>What is the problem? I used <code>servlets</code> long time ago so maybe I forgot about something...</p>