|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.davesag.generica.servlet.filter.AccessControlFilter
The AccessControlFilter checks that there is a currently logged
in user. If the current user is not logged in forward control to the login
page, as specified by the config init parameter "loginPage". You may also
pass a parameter "userClass" in order to control access to parts of the site
based on the class of user found in the session.
This method will remember the page the user was trying to get to and pass
that info on to the login action once they have successfully logged in via
the session attribute Constants.ORIGINAL_LOGIN_REQUEST.
LoginAction| Constructor Summary | |
AccessControlFilter()
|
|
| Method Summary | |
void |
destroy()
Just nulls out the instance variables. |
void |
doFilter(ServletRequest request,
ServletResponse response,
FilterChain chain)
Checks for the user key in the current session. |
void |
init(FilterConfig config)
Initialise the filter with the params from the web.xml
file. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public AccessControlFilter()
| Method Detail |
public void init(FilterConfig config)
throws ServletException
web.xml
file. The params are "loginPage" - required, and "userClass" - optional.
init in interface Filterconfig - The FilterConfig.
ServletException - if the init params were wrong.public void destroy()
destroy in interface Filter
public void doFilter(ServletRequest request,
ServletResponse response,
FilterChain chain)
throws IOException,
ServletException
doFilter in interface Filterrequest - The ServletRequestresponse - The ServletResponsechain - The FilterChain
IOException - if some IO problem happens.
ServletException - if some any other kind of problem happens.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||