hello,
 
i'm having problems into various portlets and screens i have written, using the following code line to get the uid of the connected user:
 
String username = (String) rundata.getSession().getAttribute("username");
 
It works almost always... but sometimes it returns "null" instead of the uid, and after a good number of tests i didn't succeed finding neither why nor under which circumstances it happened.
Can someone help me ?
 
To be sure the user session variables were set right after the connection, i had a few weeks ago added in the "JLoginUser.java" program the following code:
 
<
   username = data.getParameters().getString("username","");
   password = data.getParameters().getString("password","");
   data.getSession().setAttribute("username",(Object) username);
   data.getSession().setAttribute("password",(Object) password);
>
 
And until my latest developed portlet and screens, it seemed to work OK on my Java programs. 
Was i right to set these session variables that way and at this place ?
Are there other places i should set them to be sure that then, from any part of the application (portlet, screen, action,...), and at any time, i will be able to get these session variables values using the rundata.getSession().getAttribute() method.
Or am i using a wrong method ?
 
thanks,
St�phane

Reply via email to