dev@javaserverfaces.java.net

RE: JSF page(s) coming up blank after applying servlet filters on them...

From: <jacob_at_hookom.net>
Date: Thu, 15 Jun 2006 12:38:44 -0400
With your filter, do you do any kind of buffering of the response that nothing is getting flushed?  In this case, no errors will show up, just nothing on the screen.


 

I have a (few) JSF pages, which show up fine (in both IE and Firefox) in normal scenarios. But as soon as I apply servlet filters on the faces extension(s), I get into trouble. So after setting up the filters, when I load the same page(s) in each of the browsers, the filters run fine in the background, but the page(s) comes up blank (in both IE and FF). Happening only with JSF / Faces pages.

Once I remove the filter mapping, the page loads up just fine.

Would appreciate any feedback on this. TIA!

Platforms:
Tomcat 5.5.15
JSF/Faces - Sun RI 1.2
Servlet Spec: 2.4

Portion of the Web.xml code (after applying the filters onto the faces components):

Code:

:
:
   <listener>
      <listener-class>
         com.sun.faces.config.ConfigureListener
      </listener-class>
   </listener>

   <servlet>
      <servlet-name>Faces Servlet</servlet-name>
      <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
      <load-on-startup>1</load-on-startup>
   </servlet>

   <servlet-mapping>
      <servlet-name>Faces Servlet</servlet-name>
      <url-pattern>*.faces</url-pattern>
   </servlet-mapping>

   <filter>
      <filter-name>PreProcessFilter</filter-name>
      <filter-class>.....view.util.PreProcessFilter</filter-class>
   </filter>

   <filter-mapping>
      <filter-name>PreProcessFilter</filter-name>
      <url-pattern>*.html</url-pattern>
   </filter-mapping>
   <filter-mapping>
      <filter-name>PreProcessFilter</filter-name>
      <url-pattern>*.jsp</url-pattern>
   </filter-mapping>
   <filter-mapping>
      <filter-name>PreProcessFilter</filter-name>
      <url-pattern>*.faces</url-pattern>
   </filter-mapping>