Interceptor or Acegi.
d.
--- Emi Lu <[EMAIL PROTECTED]> wrote:
> Hello ,
>
> For struts1, we use "doFilter"
>
> public void doFilter(
> ServletRequest req,
> ServletResponse res,
> FilterChain chain)
> throws IOException, ServletException
> {
>
> HttpServletRequest request =
> (HttpServletRequest) req;
> HttpServletResponse response =
> (HttpServletResponse) res;
> HttpSession session = request.getSession();
>
>
> If not login successfully:
>
> ActionConfig action = ...
> this.sendRedirect(request, response,
> action.getPath());
>
>
> else {
> chain.doFilter(req,res);
> }
>
> }
>
> in web.xml, all classes/actions need be filtered by
> this actionClass.
>
> For struts2, do you have a good example for login
> checking? Moreover,
> before each action/class is called, a login checking
> will be done
> automatically. If user logins successfully, allow
> user action to be
> processed; otherwise, return error msg to default
> login page.
>
> Thank you!
>
> -e
>
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]