Issues with configuring the Ajax4Jsf Filter
rhills Dec 10, 2008 12:02 AMWe're building an app with JBoss 4.2 + Seam 2.1 + RichFaces 3.2.2.GA. Profiling has pointed the finger at TIDY parsing as a performance bottleneck in our app so after some Documentation and Forum reading, I decided to put the following in our app's web.xml file:
<context-param> <param-name>org.ajax4jsf.xmlparser.ORDER</param-name> <param-value>NONE,NEKO</param-value> </context-param> <context-param> <param-name>org.ajax4jsf.xmlparser.NONE</param-name> <param-value>.*\.xhtml|.*\.seam</param-value> </context-param>
The intention of this is to have no parsing of *.xhtml or *.seam files and use the NEKO parser for everything else.
However, when I access the home page of our app (home.seam), logging includes things like this:
2008-12-10 13:27:53,106 DEBUG [org.ajax4jsf.webapp.BaseXMLFilter] create HTML/XML parser for content type: text/html; charset=UTF-8 2008-12-10 13:27:53,356 DEBUG [org.ajax4jsf.io.parser.FastHtmlParser] Parser reached state is StateManager.LT 2008-12-10 13:27:53,356 DEBUG [org.ajax4jsf.io.parser.FastHtmlParser] Parser reached state is StateManager.EXCLAM 2008-12-10 13:27:53,356 DEBUG [org.ajax4jsf.io.parser.FastHtmlParser] Parser reached state is StateManager.DOCTYPESTART ... lots more like this 2008-12-10 13:27:53,497 DEBUG [org.ajax4jsf.io.parser.FastHtmlParser] Parser reached state is StateManager.LT 2008-12-10 13:27:53,497 DEBUG [org.ajax4jsf.io.parser.FastHtmlParser] Parser reached state is StateManager.ELEMENT 2008-12-10 13:27:53,497 DEBUG [org.ajax4jsf.webapp.BaseXMLFilter] Parsing html total time 375ms 2008-12-10 13:27:53,497 DEBUG [org.ajax4jsf.webapp.BaseFilter] Finished request processing total time 7234ms for uri: /home.seam
which suggests to me that our home page is still being parsed by the NEKO parser.
Then I tried to turn off parsing for everything using this:
<context-param> <param-name>org.ajax4jsf.xmlparser.ORDER</param-name> <param-value>NONE</param-value> </context-param> <context-param> <param-name>org.ajax4jsf.xmlparser.NONE</param-name> <param-value>.*</param-value> </context-param>
but I get exactly the same log output.
I suspect that either I'm totally misunderstanding how this works, or else (less likely) something's broken.
Note, I've posted a topic on the Seam forum: http://www.seamframework.org/Community/Ajax4jsfFilterHowToTweakItInSeam21#comment54499 which overlaps this one somewhat but covers some Seam-specific aspects. I apologise to anyone inconvenienced by any cross-posting issues.