title: Session variables in ServletRequest
body: <p>I need to access session variables through a filter. I don't even know if it is possible. In practice, the problem is that the <code>doFilter</code> method type from <code>javax.Servlet.Filter</code> implementation is <code>ServletRequest</code>, whilst HttpServlet inherited classes, doPost method parameter <code>request</code> is HttpServletRequest.</p>
  
  <ol>
  <li>Can I access session in ServletRequest in a Filter?</li>
  <li>Should I do that?</li>
  <li>What could you recommend me?</li>
  </ol>
  
  <p>Thanks!</p>