Hi,

I'm trying to make use of struts actions to intercept a user logon and
forward to the standard J2EE authentication mechanism. I've got this
working previously with pre-0.5 versions but have moved to the new
version for the current project. I was wondering if there have been any
changes which might have stopped this from working. I'm using the 17/11
build.

I have an action class which receives the logon form information
(j_username & j_password) and overwrites the (app-server - in this case
JRun - specific) attribute which specifies the requested page with a
different location. Basically I always want users to go to the same
place after a login. It then forwards to j_security_check and in theory
once the user has been authenticated they should end up at the page
I've specified. But instead nothing happens - the authentication code
is never called (I have a custom authentication module with plenty of
tracing in it) and the browser never gets anything back.

Action Code is:

        ActionForward fwd = mapping.findForward("success");
        String nextPage = request.getContextPath() + fwd.getPath();
        if (servlet.getDebug() >= 1)
                servlet.log("Forwarding to " + nextPage + " after
/j_security_check");

        session.setAttribute("allaire.jrun.security.requestedPage", 
nextPage);
        // We always forward to j_security_check from here
        return new ActionForward("/j_security_check");

struts-config entry is

        <!-- Process a user logon -->
        <action path="/logon"
                        type="com.bestbuy.webapp.LogonAction">
                <forward name="success"    path="/order/home.htm"/>
        </action>

It may be some problem with JRun but I'm not getting any helpful output
there either. Anyone any ideas - I've been getting nowhere with this
for most of this afternoon ...

All the best,

Luke.

-- 
 Luke Taylor.
 PGP Key ID: 0x57E9523C

Reply via email to