struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Newton <newton.d...@yahoo.com>
Subject Re: access to bean property in struts2
Date Thu, 15 Nov 2007 16:31:19 GMT
In your action:

public User getUser() { return this.user; }

In your JSP:

<s:property value="user.fullName"/>

Through a request wrapper you can also use JSP 2.0 EL
if you're running a JSP 2 container:

${user.fullName}

if you don't mind mixing paradigms.

d.

--- slideharmony <setoiori@tiscali.it> wrote:

> 
> Hello,
> how can I access a bean properties from a jsp page?
> I have created an action to creare a new account for
> a generic user, and I
> want to print in a jsp page the full name of the new
> user. Usually I put the
> new User object in session and obtained his
> properties by this way form the
> jsp page, but probably there is some other way with
> strut2.
> thank you
> -- 
> View this message in context:
>
http://www.nabble.com/access-to-bean-property-in-struts2-tf4815028.html#a13774814
> 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
> 
> 


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


Mime
View raw message