|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object velosurf.validation.ValidationFilter
public class ValidationFilter
This class is an optional filter that will validate query data according to the velosurf.entity
query parameter
(may be multivalued).
If data pass all validation constraints, the filter will let the request pass towards the form action. Otherwise,
it will redirect back the user to the original form (using the referer query header). In this case, the filter will
populate the session with the given values (escaped) so that they can be put back in the form.
Field Summary | |
---|---|
private javax.servlet.FilterConfig |
config
filter config |
private static java.lang.String |
ENTITY_KEY
key used to identity an entity to be validated in HTTP parameters |
Constructor Summary | |
---|---|
ValidationFilter()
|
Method Summary | |
---|---|
void |
destroy()
Destroy the filter. |
void |
doFilter(javax.servlet.ServletRequest servletRequest,
javax.servlet.ServletResponse servletResponse,
javax.servlet.FilterChain filterChain)
Filtering. |
void |
init(javax.servlet.FilterConfig filterConfig)
initialization. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private javax.servlet.FilterConfig config
private static final java.lang.String ENTITY_KEY
Constructor Detail |
---|
public ValidationFilter()
Method Detail |
---|
public void init(javax.servlet.FilterConfig filterConfig) throws javax.servlet.ServletException
init
in interface javax.servlet.Filter
filterConfig
- filter config
javax.servlet.ServletException
public void doFilter(javax.servlet.ServletRequest servletRequest, javax.servlet.ServletResponse servletResponse, javax.servlet.FilterChain filterChain) throws java.io.IOException, javax.servlet.ServletException
doFilter
in interface javax.servlet.Filter
servletRequest
- requestservletResponse
- responsefilterChain
- filter chain
java.io.IOException
javax.servlet.ServletException
public void destroy()
destroy
in interface javax.servlet.Filter
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |