title: How to get boolean value with requst getAttribute java?
body: <p>How to get boolean value set as an attribute value in request. </p>
  
  <p>Consider the following snippet</p>
  
  <pre><code>protected void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException  {
  
   boolean isOriginal = (boolean) req.getAttribute(“isOriginalFile");
  //Some code
  }
  </code></pre>
  
  <p>Where the request may/may not contain the <code>isOriginalFile</code> attribute. How to handle this?</p>