Hi Monica,
If you have single war and you can confirm that your session object is using the sam clasloader, then you can be able to put in this userdata. This is for sure.
You should then probably check out your framework.
In case of AW when you ask for the session (request.getSession()), then the session is validated basically it searches some AW specific in the session. If its not found then the session is terminated and new one is created. Please check out the AWRequest verifySessionIsValid().
Can you describe your usecase.
1) you start your WAR-> who creates the session first time, your struts ?
2) Do you have some servlet filters in place ? or your framework ? that could check also what is stored in the session ?
3) First time you access AW application or structs ? Then there is some hyperlink that is invoked ?
I think this more about Servlet API than something AW specifics besides the fact that AW terminate the session if its initiated by AW.
I think the fastest solution would be just to put the breakpoint in the invalidate method or set get attribute, you will know who removes it.