I use a lot of jQuery plugins in my JSF 2.0 application, and not all of them generate HTML that can successfully go through stringent XHTML checks on webkit browsers. Thus, the solution is to actually enter the plugin code and fix it so that it generates valid HTML, which in itself is a very time-consuming process or wraps the content of the generated HTML in <f:view contentType="text/html">
. The latter is pretty straight forward and it works. Are there any drawbacks to using <f:view>
to override the content type this way?
source share