org.w3c.tidy.servlet.filter
Class JTidyFilter

java.lang.Object
  extended byorg.w3c.tidy.servlet.filter.JTidyFilter
All Implemented Interfaces:
javax.servlet.Filter

public class JTidyFilter
extends java.lang.Object
implements javax.servlet.Filter

Wrapp the Response and creates TidyProcessor who does all the work. Use this filter instead of TidyTag if you don't want to modify your JSP pages or HTML is denerated by non JSP servlets.

Version:
$Revision: 1.5 $ ($Author: vlads $)
Author:
Vlad Skarzhevskyy skarzhevskyy@gmail.com

Field Summary
static java.lang.String CONFIG_COMMENTS_SUBST
          name of the parameter commentsSubst.
static java.lang.String CONFIG_CONFIG
          name of the parameter config containing JTidy Parser configutation string.
static java.lang.String CONFIG_DOUBLE_VALIDATION
          name of the parameter doubleValidation.
static java.lang.String CONFIG_PROPERTIES_FILE_NAME
          name of the parameter properties.filename containing the properties file path.
static java.lang.String CONFIG_TEE
          name of the parameter tee.
static java.lang.String CONFIG_VALIDATE_ONLY
          name of the parameter validateOnly.
 
Constructor Summary
JTidyFilter()
           
 
Method Summary
 void destroy()
          
 void doFilter(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse, javax.servlet.FilterChain filterChain)
          Buffer the Response.
 void init(javax.servlet.FilterConfig filterConfig)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CONFIG_PROPERTIES_FILE_NAME

public static final java.lang.String CONFIG_PROPERTIES_FILE_NAME
name of the parameter properties.filename containing the properties file path.

See Also:
Constant Field Values

CONFIG_CONFIG

public static final java.lang.String CONFIG_CONFIG
name of the parameter config containing JTidy Parser configutation string. JTidy Parser configutation string Examples of config string: indent: auto; indent-spaces: 2

See Also:
Constant Field Values

CONFIG_TEE

public static final java.lang.String CONFIG_TEE
name of the parameter tee. Do not buffer the output, Preform validation only This may send the responce back to browser while we are still parsing the HTML May solve problem for some applications that are flushing the OutputStream

See Also:
Constant Field Values

CONFIG_VALIDATE_ONLY

public static final java.lang.String CONFIG_VALIDATE_ONLY
name of the parameter validateOnly. validateOnly only do not change output.

See Also:
Constant Field Values

CONFIG_DOUBLE_VALIDATION

public static final java.lang.String CONFIG_DOUBLE_VALIDATION
name of the parameter doubleValidation. Performs validation of html processed by <jtidy:tidy> jsp tag By default this is not done. Only Usefull for testing JTidy This will create second requestID to store the data

See Also:
Constant Field Values

CONFIG_COMMENTS_SUBST

public static final java.lang.String CONFIG_COMMENTS_SUBST
name of the parameter commentsSubst. Special html comments: <!--jtidy:requestID--> <!--jtidy:validationImage-->

See Also:
Constant Field Values
Constructor Detail

JTidyFilter

public JTidyFilter()
Method Detail

init

public void init(javax.servlet.FilterConfig filterConfig)

Specified by:
init in interface javax.servlet.Filter

destroy

public void destroy()

Specified by:
destroy in interface javax.servlet.Filter

doFilter

public void doFilter(javax.servlet.ServletRequest servletRequest,
                     javax.servlet.ServletResponse servletResponse,
                     javax.servlet.FilterChain filterChain)
              throws java.io.IOException,
                     javax.servlet.ServletException
Buffer the Response.

Specified by:
doFilter in interface javax.servlet.Filter
Throws:
java.io.IOException
javax.servlet.ServletException


Copyright © 2004-2005 sourceforge. All Rights Reserved.