Reputation: 697
In my xpages application I set some variables that are valid for the session of the user in a sessionScope variable.
I would like to use these user settings in my Java classes.
Is possible to read a specific sessionScope variable in my java class and how should I do this?
Upvotes: 0
Views: 1277
Reputation: 3757
Have a look at the com.ibm.xsp.extlib.util.ExtLibUtil
class. It comes with static methods to access the scope variables. You can get a map of all session scope variables like this:
Map sessionScope = ExtLibUtil.getSessionScope();
String yourVar = (String) sessionScope.get("varName");
Upvotes: 5