title: session created for every different request
body: <p>I have one jsp which is refreshing after a fix interval and each time I am sending get request to the controller's(servlet) doGet() method. In this doGet method I am not creating any session and simply dispatching request using RequestDispatcher. So flow is like this-></p>
  
  <ol>
  <li>Send Request to Controller's doGet() </li>
  <li>controller receives request and send response back to jsp</li>
  <li>repeat step 1 and 2 after fix interval</li>
  </ol>
  
  <p>Now issue is I have used &lt;%@ page session="false" %> in my jsp and also I am not creating any session in doGet() method but still I can see session is getting created for each different request from differnt browsers/client. It is not allowing my jsp to be session less. does tomcat is creating session for each request ? or any other issue is with my code? please help</p>
  
  <p>edit:</p>
  
  <p><code>doGet()</code> method code:</p>
  
  <pre><code>protected void doGet(HttpServletRequest request, HttpServletResponse      response) throws ServletException, IOException {
  request.setAttribute("xyz",xyz);
  RequestDispatcher rd = request.getRequestDispatcher("/my.jsp");
  rd.forward(request, response);  
  }
  </code></pre>
  
  <p>If I hit URL <a href="http://localhost:8080/MyApp/GetDataFromServlet" rel="nofollow noreferrer">http://localhost:8080/MyApp/GetDataFromServlet</a> request will go to GetDataFromServlet servlet and it will redirect to my.jsp and in my.jsp I have used interval of 5 seconds so after 5 seconds request will come again to doGet() method inside GetDataFromServlet servlet.</p>
  
  <p>jsp:</p>
  
  <pre><code>&lt;body&gt;
  
  Some element to show : &lt;%=request.getAttribute("xyz") %&gt;
  
  &lt;script&gt;
  $(document).ready(function(){
  function refresh() {   
  
          window.location.reload();              
  }
  }
  setTimeout(refresh, 5000);
  &lt;/script&gt;
  &lt;/body&gt; 
  </code></pre>