toolbox.web
Class SyncTokenFilter

Package class diagram package SyncTokenFilter
java.lang.Object
  extended by toolbox.web.SyncTokenFilter
All Implemented Interfaces:
javax.servlet.Filter

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

Filter implementation to ensure that no duplicate form submissions occur.


Constructor Summary
SyncTokenFilter()
          Default constructor
 
Method Summary
 void destroy()
          Destroy
 void doFilter(javax.servlet.ServletRequest request, javax.servlet.ServletResponse response, javax.servlet.FilterChain chain)
          Verify that the token value for the submitted form has changed.
 void init(javax.servlet.FilterConfig config)
          Initialise this filter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SyncTokenFilter

public SyncTokenFilter()
Default constructor

Method Detail

init

public void init(javax.servlet.FilterConfig config)
          throws javax.servlet.ServletException
Initialise this filter.

Specified by:
init in interface javax.servlet.Filter
Parameters:
config - Filter configuration.
Throws:
javax.servlet.ServletException - if filter cannot be initialised.

doFilter

public void doFilter(javax.servlet.ServletRequest request,
                     javax.servlet.ServletResponse response,
                     javax.servlet.FilterChain chain)
              throws javax.servlet.ServletException,
                     java.io.IOException
Verify that the token value for the submitted form has changed.

Specified by:
doFilter in interface javax.servlet.Filter
Parameters:
request - ServletRequest
response - ServletResponse
chain - FilterChain
Throws:
javax.servlet.ServletException
java.io.IOException

destroy

public void destroy()
Destroy

Specified by:
destroy in interface javax.servlet.Filter