This table lists all the configurable properties for the library. The default properties are defined in
the
JTidyServlet.properties
file included in the library jar.
There are 2 ways to override default property settings for the whole web application:
<init-param>
properties.filename
for
JTidyFilter
or
JTidyServlet
in
web.xml
. If the key required does not exist in the specified file, the key will take default value defined
in the file "JTidyServlet.properties".
Configure properties using JTidyServlet in your application web.xml
<web-app> ... <servlet> <servlet-name>JTidyServlet</servlet-name> <servlet-class>org.w3c.tidy.servlet.TidyServlet</servlet-class> <load-on-startup>1</load-on-startup> <init-param> <param-name>properties.filename</param-name> <param-value>JTidyServletProduction.properties</param-value> </init-param> </servlet>
Configure properties using JTidyFilter in your application web.xml
<web-app> ... <filter> <filter-name>JTidyFilter</filter-name> <filter-class>org.w3c.tidy.servlet.filter.JTidyFilter</filter-class> <init-param> <param-name>properties.filename</param-name> <param-value>JTidyServletProduction.properties</param-value> </init-param> </filter>
Property | Default | Valid Values | Description |
---|---|---|---|
imageGetTimeout | 2000 | Any reasonable number | Time in milliseconds the servlet thread will sleep if Record is not yet available in Repository. If validate only is on, browser receives and start displaying HTML page before it was validated by JTidy. |
imageNamePrefix | jtidy_html_32x26_ | String | The image name prefix for validation icons. You could change images to better match your application style. First servlet will try to load image from Resources using ClassLoader if not found would be redirected to RequestDispatcher. |
imageNameExtension | .png | String | Image name is constructed from imageNamePrefix + [unknown|error|warning|ok] + imageNameExtension |
imageWidth | 32 | int | |
imageHeight | 26 | int | |
xhtml | true | boolean | output jtidy validation image tag as xhtml |
JTidyServletURI | /JTidy | String |
Real path to JTidyServlet should match one in web.xml
<servlet-mapping><url-pattern>
for JTidyServlet. This value is used to build working links to validation images and
JTidy reports created by
<jtidy:validationImage/>
JSP Tags. The href and src would begin with this string
request.getContextPath() + JTidyServletURI
|
repositoryFactory.class | ...DefaultRepositoryFactory | Fully Qualified Class name for a valid RepositoryFactory implementation | Public interface for user to redefine validation results handling. |