users@glassfish.java.net

Re: JSR196 ServerAuthModule doing Form-based login stopped working when migrating to GlassFish 3.1.1

From: Kumar Jayanti <v.b.kumar.jayanti_at_oracle.com>
Date: Wed, 10 Aug 2011 16:15:46 +0530

On 10-Aug-2011, at 1:16 PM, forums_at_java.net wrote:

> 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.

So does that mean the browser is no longer sending the Cookie ?. Or do you think something else is screwing up ?.

> 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());
I assume the name "j_security_check" here is just a name for the cookie , with no other significance?.
>
> 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
>
>