org.tuckey.web.filters.validation
Class ValidationFilter

java.lang.Object
  extended by org.tuckey.web.filters.validation.ValidationFilter
All Implemented Interfaces:
javax.servlet.Filter

public final class ValidationFilter
extends java.lang.Object
implements javax.servlet.Filter

todo: add ant task that will validate a dir of files todo: add sample xhtml file linked to from error page so user can copy an paste into theirs todo: status code when failed parse should be 500 or similar


Field Summary
static java.lang.String VERSION
           
 
Constructor Summary
ValidationFilter()
           
 
Method Summary
 void destroy()
          Gets run when the web application container destroys the filter.
 void doFilter(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse, javax.servlet.FilterChain filterChain)
          Gets run for each request mapped by this filter.
 void init(javax.servlet.FilterConfig filterConfig)
          Gets run when the web application container initialises this filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION

public static final java.lang.String VERSION
See Also:
Constant Field Values
Constructor Detail

ValidationFilter

public ValidationFilter()
Method Detail

init

public void init(javax.servlet.FilterConfig filterConfig)
          throws javax.servlet.ServletException
Gets run when the web application container initialises this filter.

Specified by:
init in interface javax.servlet.Filter
Parameters:
filterConfig - the filter's config
Throws:
javax.servlet.ServletException

destroy

public void destroy()
Gets run when the web application container destroys the filter.

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
Gets run for each request mapped by this filter.

Specified by:
doFilter in interface javax.servlet.Filter
Parameters:
servletRequest - the request
servletResponse - the response
filterChain - the chain
Throws:
java.io.IOException
javax.servlet.ServletException