I'm trying to test the Jtidy filter on a ridiculously simple hello world Struts project.
I'm following other answers that were given here in the past.
I do not get any errors during deployment or accessing JSPs. But it seems like the filter does nothing. i.e. no html comments are being removed from the created html's.
The Struts filter seems to work fine.. since my Action class is getting called.
Here is my web.xml:
<web-app id="WebApp_ID" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>Struts 2 Web Application</display-name>
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter>
<filter-name>JTidyFilter</filter-name>
<filter-class>org.w3c.tidy.servlet.filter.JTidyFilter</filter-class>
<init-param>
<param-name>config</param-name>
<param-value>indent: auto; indent-spaces: 2; hide-comments: true</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
<filter-mapping>
<filter-name>JTidyFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
</web-app>
What might I be doing wrong here? How can I find out, if I don't get any exceptions?