title: Java Servlet Pass Value from Filter to Servlet Code
body: <p>I have a Java HTTP Servlet running in Tomcat. I have a filter that is doing some pre-processing on requests. The filter contains some if/else logic.
  I want to set a boolean value in my servlet processing code (doGet/doPost) based on which action my filter performed.</p>
  
  <p><strong>What is the correct way to pass this information from my filter to my servlet method?</strong> One idea is to update the request via a setAttribute method, but I am not sure if this is the right way.</p>