webtier@glassfish.java.net

forward to j_security_check

From: <jmilkiewicz_at_gmail.com>
Date: Tue, 31 May 2011 23:33:46 +0200

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