webtier@glassfish.java.net

Re: forward to j_security_check

From: Joel Weight <digitaljoel_at_gmail.com>
Date: Tue, 31 May 2011 15:41:25 -0600

I followed this and had jsf and spring security (at j_security_check)
working about 18 months ago.

http://ocpsoft.com/java/acegi-spring-security-jsf-login-page/

So I Know it's possible. Looks like it is doing what you are already
trying, so could it be some problem with your faces configuration actually
looking for a faces view at j_security_check?

<http://ocpsoft.com/java/acegi-spring-security-jsf-login-page/>Joel

On Tue, May 31, 2011 at 3:33 PM, jmilkiewicz_at_gmail.com <
jmilkiewicz_at_gmail.com> wrote:

> Hi
>
> I am creating a small web application and want to use JEE security with
> Form based authentication. The problem is that users of my site will not
> provide j_username on login form but some kind of input name that first
> needs to be resolved to j_username. To handle this requirement i decided to
> make a login form with action attribute pointing to my own loginServlet,
> which is reponsible for resolving username to j_username and dispatch to
> j_security_check, I tried to do obtain requestDispatcher by
> request.getRequestDispatcher() or context.getRequestDispatcher().
> Unfortunately in either case execution of requestDispatcher.forward()
> returns 404. Does anyone know if forwarding to j_security_check is doable?
>
> br
> miluch
>