title: OpenSessionInViewFilter +Redirect in JSF
body: <p>I have JSF 2.1 application uisng Spring and Hibernate. </p>
  
  <p>In order to solve LazyLoading problem I'm using OpenSessionInView Filter. </p>
  
  <pre><code>&lt;filter&gt;
      &lt;filter-name&gt;openSessionInViewFilter&lt;/filter-name&gt;
      &lt;filter-class&gt;org.springframework.orm.hibernate3.support.OpenSessionInViewFilter&lt;/filter-class&gt;
  &lt;/filter&gt;
   &lt;filter-mapping&gt;
      &lt;filter-name&gt;openSessionInViewFilter&lt;/filter-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
  &lt;/filter-mapping&gt;
  </code></pre>
  
  <p>Everything works fine my lazy classes are initiated, but when I'm using Navigation Rule with Redirect </p>
  
  <pre><code> &lt;navigation-rule&gt;
     &lt;from-view-id&gt;/index.xhtml&lt;/from-view-id&gt;
     &lt;navigation-case&gt;
         &lt;from-outcome&gt;fail&lt;/from-outcome&gt;
         &lt;to-view-id&gt;/index.xhtml&lt;/to-view-id&gt;
         &lt;redirect /&gt;
     &lt;/navigation-case&gt;
  &lt;/navigation-rule&gt;
  </code></pre>
  
  <p>I'm getting <code>org.hibernate.LazyInitializationException:</code> id I remove <code>&lt;redirect /&gt;</code> tag everything works fine. </p>
  
  <p>Why? Is it because new View has been created? So why do I have new Hibernate Session?
  Is there any work around?  </p>