dev@javaserverfaces.java.net

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

From: Maheswary, Jiten <c_jmahes_at_qualcomm.com>
Date: Thu, 15 Jun 2006 18:04:54 -0700

Solved. It was a FacesContext exception error rectified by changing the
url mapping in the web.xml to /faces/*.

 

Thanks,

Jiten

 

________________________________

From: Maheswary, Jiten
Sent: Thursday, June 15, 2006 9:15 AM
To: 'dev_at_javaserverfaces.dev.java.net'
Subject: JSF page(s) coming up blank after applying servlet filters on
them...

 

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>