0 Replies Latest reply on Sep 5, 2008 5:39 PM by anikanchan

    ajax4jsf-filter force-parser attribute not working

    anikanchan

      We're experiencing a performance issue with Ajax4JSF with respect to its Tidy plugin. We've dome some profiling and we've found the class:

      org.ajax4jsf.webapp.FilterServletResponseWrapper.parseContent

      Is the biggest performance hog in the use case, consuming 90% of the process. I've tried to disable the tidy parser using components.xml by doing the following:

      <web:ajax4jsf-filter force-parser="false" />

      However, when we re-run the same tests, the profiling results are exactly the same each time. perhaps my understanding of this attribute is incorrect, but my hope was that it would not parse the entire page? If this is in correct, if we want to use the Neko parser, do we have to define it in web.xml?

      In addition to trying to suppress this filter, we also tried NEKO plugin for filter but it broke most of the RichFaces component. We added the filters in web.xml as following:


      <filter>
       <display-name>RichFaces Filter</display-name>
       <filter-name>richfaces</filter-name>
       <filter-class>org.ajax4jsf.Filter</filter-class>
       </filter>
       <filter-mapping>
       <filter-name>richfaces</filter-name>
       <servlet-name>Faces Servlet</servlet-name>
       <dispatcher>FORWARD</dispatcher>
       <dispatcher>REQUEST</dispatcher>
       <dispatcher>INCLUDE</dispatcher>
       </filter-mapping>
      .................
      .................
      
       <context-param>
       <param-name>org.ajax4jsf.xmlparser.ORDER</param-name>
       <param-value>NEKO,TIDY,NONE</param-value>
       </context-param>
       <context-param>
       <param-name>org.ajax4jsf.xmlparser.TIDY</param-name>
       <param-value>.*\..*</param-value>
       </context-param>
       <context-param>
       <param-name>org.ajax4jsf.xmlparser.NEKO</param-name>
       <param-value>/abc/xyz.xhtml</param-value>
       </context-param>
       <context-param>
       <param-name>org.ajax4jsf.xmlparser.NONE</param-name>
       <param-value>/pages/performance\.xhtml,/pages/default.*\.xhtml</param-value>
       </context-param>


      Idea was to parse xyz.xhtml under abc folder to be parsed using NEKO and rest of the xhtmls using TIDY. Any idea what we might be doing wrong? Thanks.