Okay, now i have try to look at the link you send me. But i still don't think that is the first problem.
My problem is that it return null, and that have nothing to do with the session i think. I have try to short down the code, so it is more simple to understand. REMEMBER it should be possible to get some value other then null first time you open the page.
JAVA (test.adgang) class