Search code examples
javawebspherewebsphere-portalhttpsession

IBM WebSphere Application/Portal Servers, TAI and HttpSession and Cookies


I have IBM WAS 6.1 and Portal 6.1. Also i have a TAI which works when user login/logout in/out Portal. I want to work with HttpSession in TAI. Shortly my task is next: when user logging in i want to save some parameter in memory and as a key i want to use ID of HttpSession (or something else?).

For an example, while user logging id of httpsession is "foo". Than, user logged in and working in Portal, and press Logout button, portal logged out user using internal mechanize and than my TAI catch this request and now i have a http session with Id "bar". So, WAS changed http session. This means i can not user http session to save any parameter, because WAS recreates it for logging out. But i have to save some parameter while user logging in, and use it while he logging out.

Also i can't use Cookies for some reasons. Any idea how i can save ID based on HttpSession?

Or i have to know who(Portal Uid of user) pressed logout button in TAI. It is also helps me to resolve my problem.

UPDATE #1.

Also, for some reason WAS(?) delete custom cookie. I add custom cookie in TAI and WAS deleting it, i can not find my own cookie. Any idea where and why? There also http server beyond was and client, but i checked it - he shouldn't delete it.


Solution

  • I did not resolve question about http session, but i resolved problem with a cookie. Right cookie:

    Cookie cooky = new Cookie();
    cooky.setPath("/");
    cooky.setDomain("domain.com");