Hi,
Jesse Alexander (KBSA 21) wrote:
> OK
>
> I looked into what JTidy delivers. Unfortunately it is not what we want
> :(
>
> The current jtidyServletFilter just VALIDATES the html and includes a
> validation-icon into the html-code delivered.The PrettyPrint feature is
> only
> available in the full-featured jtidy.
I can't belive, and so i checked again. The filter can be configured to
do PrettyPrint. and it works!
just put
jtidy-r8-SNAPSHOT.jar and jtidyservlet-r8-SNAPSHOT.jar
into WEB-INF/lib
and add
<filter>
<description>Filter for JSP</description>
<filter-name>JTidyFilter</filter-name>
<filter-class>org.w3c.tidy.servlet.filter.JTidyFilter</filter-class>
<init-param>
<param-name>tee</param-name>
<param-value>false</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>JTidyFilter</filter-name>
<url-pattern>/faces/*</url-pattern>
</filter-mapping>
to your web.xml.
To enable PrettyPrint set init-param 'tree' to true, the default is false!
you can see the result at
http://weber-oldenburg.dyndns.org/tobago-example-demo/
compare the output to
http://tobago.atanion.net/tobago-example-demo/
to see the difference.
regards
Volker
--
Don't answer to From: address!
Mail to this account are droped if not recieved via mailinglist.
To contact me direct create the mail address by
concatenating my forename to my senders domain.