users@glassfish.java.net

JSR196 ServerAuthModule doing Form-based login stopped working when migrating

From: <forums_at_java.net>
Date: Wed, 10 Aug 2011 02:46:25 -0500 (CDT)

I have a JSR196 ServerAuthModule that uses form-based login, and it works
fine with GlassFish v2.1 (9.1.1) (build b60e-fcs).

After migrating to GlassFish 3.1.1, the ServerAutModule fails to redirect to
the URI of original request after successful authentication, because the
cookie that holds the URI is missing. The source code of the ServerAuthModule
and the login form is exactly the same on GlassFish v2.1 and GlassFish 3.1.1.

The code that creates the cookie and redirects to the login form looks like:

    Cookie req = new Cookie("j_security_check", request.getRequestURI());

    req.setPath(request.getContextPath());

    try {

        response.addCookie(req);

        response.sendRedirect(request.getContextPath() + "/login.jsp");

    }...

    

Has anyone else experienced similar problems?


--
[Message sent by forum member 'paal']
View Post: http://forums.java.net/node/831191