cancel
Showing results for 
Search instead for 
Did you mean: 

HttpSetterCallback in custom login module

Former Member
0 Kudos

I´m trying to return a value from a custom login module back to the originally called application. While this works fine using a cookie it doesn´t seem to work for a session attribte. I did the following:


// creating the callbacks: one for the cookie, another one for the session attribute
HttpSetterCallback cookieSetterCallback = new HttpSetterCallback();
cookieSetterCallback.setType(HttpSetterCallback.COOKIE);
cookieSetterCallback.setName("MYVALUE");

HttpSetterCallback attribSetterCallback = new HttpSetterCallback();
attribSetterCallback.setType(HttpSetterCallback.SESSION_ATTRIBUTE);
attribSetterCallback.setName("MYVALUE");

// Passing the values (try/catch omitted)
cookieSetterCallback.setValue(aString);
attribSetterCallback.setValue(aString);
callbackHandler.handle(new Callback[] {cookieSetterCallback, attribSetterCallback});

Within the following jsp a cookie exists with the expected value. However, a (String)session.getAttribute("MYVALUE") returns null.

Any ideas what the problem might be?

Best regards,

Frank

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Any luck in setting session variable from login module?

srinivas_cheruku
Explorer
0 Kudos

Hi,

I am having almost the same problem. If you have solved this problem, can you please share the way you have done this.

Many Thanks,

Srini

Former Member
0 Kudos

Hi Frank,

I have exactly the same problem. I am not able to read session attributes in the following jsp-page. Did you manage to solve the problem?

Nice regards,

Florian