why JSF can not get the session's var?
I have set the session var in my managed-bean, in my jsf page I can use the <% session.getAttribute( "var" )%> to get the session var, and
the JSF EL( #{ var } ) do so, but #{session.var} or #{sessionSCope.var} can't return the session var's value. I am using Resin3.1.1 and JSF1.2.
Any one can help me, thanks.
[339 byte] By [
mypdaa] at [2007-11-27 9:36:19]

# 2
sorry, It's wrong, I have used the JSF EL #{sessionScope.var}, but nothing return, but #{var} well done, that's why?
mypdaa at 2007-7-12 23:05:07 >

# 3
sorry, It's wrong, I have used the JSF EL #{sessionScope.var}, but nothing return, but #{var} well done, that's why?
mypdaa at 2007-7-12 23:05:07 >

# 5
Hello, I'm using jdeveloper. Create class file as session scopeDefine private variable ( visible ) with set and get method you can use this variable from any request scope page and/or binding any Component with it.Manssi,
# 6
hi Manssi,thanks for your answer, your means is NOT to set / get var by session just like jsp and using set / get method in JSF instead, right?Would you like give me some code section? thank you.
mypdaa at 2007-7-12 23:05:07 >

# 7
public class EnvSetting {
private String skinFamily = "";
private String lang = "en";
public void setskinFamily(String skin)
{
skinFamily = skin;
if (skin.equals("Test1"))
{
Locale lc= new Locale("ar", "JO","WINDOWS");
Locale.setDefault(lc);
setLang("ar");
}
else
{
Locale lc= new Locale("en", "UK","WINDOWS");
Locale.setDefault(lc);
setLang("en");
}
}
public String getskinFamily()
{
if (skinFamily.length()== 0)
{
if (Locale.getDefault().getLanguage().equalsIgnoreCase("EN"))
{
return "Test";
}
else
{
return "Test1";
}
}
else
return skinFamily;
}
public void setLang(String l){
lang = l;
}
public String getLang(){
return lang;
}
Message was edited by:
JavaIQ