title: request.getSession() is null
body: <p>I will appreciate if someone help me with the following problem. 
  I have a jasper report which i fill in a <code>PrintingBean</code> and its all good. The moment I clicked on a print preview button (opening the applet) my app throws a null pointer exception at:</p>
  
  <pre><code>if (bean.getPrintingDataList() != null &amp;&amp; !bean.getPrintingDataList().isEmpty())
  </code></pre>
  
  <p>It seems like it makes new session (but I can't see that on gui, its all good). My manageBean is a SessionScoped. This is my whole method: </p>
  
  <pre><code>private void processRequest(HttpServletRequest request, HttpServletResponse response)
          throws ServletException, IOException {
  
      JasperPrint jasperPrint = null;
  
      try {
          PrintingBean bean = (PrintingBean) request.getSession().getAttribute("printMB");
          if (bean.getPrintingDataList() != null &amp;&amp; !bean.getPrintingDataList().isEmpty()) {
              jasperPrint = printManager.print(bean.getPrintingDataList());
          }
      } catch (Exception ex) {
          Logger.getLogger(JasperPrintServlet.class.getName()).log(Level.SEVERE, null, ex);
      }
      if (jasperPrint != null) {
          response.setContentType("application/octet-stream");
          ServletOutputStream ouputStream = response.getOutputStream();
  
          ObjectOutputStream oos = new ObjectOutputStream(ouputStream);
          oos.writeObject(jasperPrint);
          oos.flush();
          oos.close();
  
          ouputStream.flush();
          ouputStream.close();
      }
  }
  </code></pre>