You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by xianwinwin <xi...@gmail.com> on 2008/01/14 16:24:17 UTC

(Struts2) howto access the user.fname on the jsp page (user's object in http session)

Hi there,

using struts2: I have just place the user's information on a session:

session.setAttribute(Properties.USER_HANDLE, secUser);


I wonder how to access on a jsp page the info; I tried, unsuccessfully, the
following combinations:


<s:text name="USER_SESSSION_HANDLE"><s:bean name="fname"></s:bean></s:text>
<s:label><s:bean name="USER_SESSSION_HANDLE.fname"></s:bean></s:label>


any idea?
-- 
View this message in context: http://www.nabble.com/%28Struts2%29-howto-access-the-user.fname-on-the-jsp-page-%28user%27s-object-in-http-session%29-tp14803679p14803679.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: (Struts2) howto access the user.fname on the jsp page (user's object in http session)

Posted by xianwinwin <xi...@gmail.com>.
THANK YOU ROBI!!!!



Roberto Nunnari wrote:
> 
> Try this:
> 
> <s:property value="%{#session.USER_SESSSION_HANDLE.fname}"/>
> 
> --
> Robi
> 
> 
> xianwinwin wrote:
>> Hi there,
>> 
>> using struts2: I have just place the user's information on a session:
>> 
>> session.setAttribute(Properties.USER_HANDLE, secUser);
>> 
>> 
>> I wonder how to access on a jsp page the info; I tried, unsuccessfully,
>> the
>> following combinations:
>> 
>> 
>> <s:text name="USER_SESSSION_HANDLE"><s:bean
>> name="fname"></s:bean></s:text>
>> <s:label><s:bean name="USER_SESSSION_HANDLE.fname"></s:bean></s:label>
>> 
>> 
>> any idea?
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/%28Struts2%29-howto-access-the-user.fname-on-the-jsp-page-%28user%27s-object-in-http-session%29-tp14803679p14804470.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: (Struts2) howto access the user.fname on the jsp page (user's object in http session)

Posted by Roberto Nunnari <ro...@supsi.ch>.
Try this:

<s:property value="%{#session.USER_SESSSION_HANDLE.fname}"/>

--
Robi


xianwinwin wrote:
> Hi there,
> 
> using struts2: I have just place the user's information on a session:
> 
> session.setAttribute(Properties.USER_HANDLE, secUser);
> 
> 
> I wonder how to access on a jsp page the info; I tried, unsuccessfully, the
> following combinations:
> 
> 
> <s:text name="USER_SESSSION_HANDLE"><s:bean name="fname"></s:bean></s:text>
> <s:label><s:bean name="USER_SESSSION_HANDLE.fname"></s:bean></s:label>
> 
> 
> any idea?



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: (Struts2) howto access the user.fname on the jsp page (user's object in http session)

Posted by Dave Newton <ne...@yahoo.com>.
\--- On Wed, 9/17/08, mctdeveloper wrote:
> Click the following link
> 
> http://intricatetips.blogspot.com

Or read the documentation:

http://struts.apache.org/2.x/docs/how-do-we-get-access-to-the-session.html

Dave


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: (Struts2) howto access the user.fname on the jsp page (user's object in http session)

Posted by mctdeveloper <ms...@yahoo.com>.
Click the following link

http://intricatetips.blogspot.com

Regards

-- 
View this message in context: http://www.nabble.com/%28Struts2%29-howto-access-the-user.fname-on-the-jsp-page-%28user%27s-object-in-http-session%29-tp14803679p19525044.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org