title: Pretty faces config issues on WebSphere Application server - JSF2
body: <p>"Error 500: com.ocpsoft.pretty.PrettyFilter incompatible with javax.servlet.Filter" </p>
  
  <ul>
  <li>JSF2.1.2    </li>
  <li>Prettyfaces-jsf2-3.3.2    </li>
  <li>Primefaces 3.2    </li>
  <li>WebSphere Application Server 7.0.0.9</li>
  </ul>
  
  <p>Tried with adding custom properties in WebSphere admin console for filter compatibility(Last in FAQ at <a href="http://ocpsoft.org/prettyfaces/" rel="nofollow">http://ocpsoft.org/prettyfaces/</a>).
  Tomcat 6.0.32 don't have any issues but once deployed the app in WAS got the issue. </p>
  
  <p>Below is webxml</p>
  
  <pre><code>&lt;context-param&gt;
      &lt;param-name&gt;defaultHtmlEscape&lt;/param-name&gt;
      &lt;param-value&gt;true&lt;/param-value&gt;
  &lt;/context-param&gt;
  
  &lt;context-param&gt;
      &lt;param-name&gt;com.sun.faces.numberOfViewsInSession&lt;/param-name&gt;
      &lt;param-value&gt;3&lt;/param-value&gt;
  &lt;/context-param&gt;
  
  &lt;context-param&gt;
      &lt;param-name&gt;com.sun.faces.numberOfLogicalViews&lt;/param-name&gt;
      &lt;param-value&gt;10&lt;/param-value&gt;
  &lt;/context-param&gt;
  
  &lt;context-param&gt;
      &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt;
      &lt;param-value&gt;classpath*:WEB-INF/Controller-servlet.xml&lt;/param-value&gt;
  &lt;/context-param&gt;
  
  &lt;context-param&gt;
      &lt;param-name&gt;com.sun.faces.expressionFactory&lt;/param-name&gt;
      &lt;param-value&gt;com.sun.el.ExpressionFactoryImpl&lt;/param-value&gt;
  &lt;/context-param&gt;
  
   &lt;context-param&gt;
      &lt;description&gt;JSF Injection provider&lt;/description&gt;
      &lt;param-name&gt;com.sun.faces.injectionProvider&lt;/param-name&gt;
      &lt;param-value&gt;net.devgrok.jsf.Tomcat6GuiceInjectionProvider&lt;/param-value&gt;
  &lt;/context-param&gt;
  
  &lt;context-param&gt;
      &lt;param-name&gt;primefaces.THEME&lt;/param-name&gt;
      &lt;param-value&gt;cupertino&lt;/param-value&gt;
  &lt;/context-param&gt;
  
  &lt;context-param&gt;
      &lt;param-name&gt;javax.faces.PARTIAL_STATE_SAVING&lt;/param-name&gt;
      &lt;param-value&gt;false&lt;/param-value&gt;
  &lt;/context-param&gt;
  
  &lt;context-param&gt;
      &lt;param-name&gt;javax.faces.FULL_STATE_SAVING_VIEW_IDS&lt;/param-name&gt;
      &lt;param-value&gt;abc.xhtml&lt;/param-value&gt;
  &lt;/context-param&gt;
  
  &lt;!--  JSF Required Context Params END--&gt;
  
  &lt;!--  JSF Required Filters &amp; Listeners START--&gt;
  &lt;filter&gt;
      &lt;filter-name&gt;PrimeFaces FileUpload Filter&lt;/filter-name&gt;
      &lt;filter-class&gt;org.primefaces.webapp.filter.FileUploadFilter&lt;/filter-class&gt;
      &lt;init-param&gt;
          &lt;param-name&gt;thresholdSize&lt;/param-name&gt;
          &lt;param-value&gt;1048576000&lt;/param-value&gt;&lt;!--51200--&gt;
      &lt;/init-param&gt;
      &lt;init-param&gt;
          &lt;param-name&gt;uploadDirectory&lt;/param-name&gt;
          &lt;param-value&gt;/temp&lt;/param-value&gt;
      &lt;/init-param&gt;
  &lt;/filter&gt;
  
  &lt;filter-mapping&gt;
      &lt;filter-name&gt;PrimeFaces FileUpload Filter&lt;/filter-name&gt;
      &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
  &lt;/filter-mapping&gt;
  &lt;!-- Creates the Spring Container shared by all Servlets and Filters --&gt;
  
  &lt;listener&gt;
      &lt;listener-class&gt;org.springframework.web.context.ContextLoaderListener&lt;/listener-class&gt;
  &lt;/listener&gt;
  
  &lt;filter&gt;
      &lt;filter-name&gt;Pretty Filter&lt;/filter-name&gt;
      &lt;filter-class&gt;com.ocpsoft.pretty.PrettyFilter&lt;/filter-class&gt;
  &lt;/filter&gt;
  &lt;filter-mapping&gt;
      &lt;filter-name&gt;Pretty Filter&lt;/filter-name&gt;
      &lt;url-pattern&gt;/*&lt;/url-pattern&gt;
      &lt;dispatcher&gt;FORWARD&lt;/dispatcher&gt;
      &lt;dispatcher&gt;REQUEST&lt;/dispatcher&gt;
  
  &lt;/filter-mapping&gt;
  
  &lt;!--  JSF Required Filters &amp; Listeners END--&gt;
  
  &lt;!--  JSF Required Servlets START --&gt;
  
  &lt;servlet&gt;
      &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
      &lt;servlet-class&gt;javax.faces.webapp.FacesServlet&lt;/servlet-class&gt;
      &lt;load-on-startup&gt;1&lt;/load-on-startup&gt;
  &lt;/servlet&gt;
  &lt;servlet-mapping&gt;
      &lt;servlet-name&gt;Faces Servlet&lt;/servlet-name&gt;
      &lt;url-pattern&gt;*.jsf&lt;/url-pattern&gt;
  &lt;/servlet-mapping&gt;
  </code></pre>