You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by beyaNet Consultancy <be...@ntlworld.com> on 2004/02/03 19:00:57 UTC

Property retrieval from an object held in a session object

Hi,
I have assigned a user object to a session by doing the following:

User userDetails = User.getUser(42);
session.setAttribute("userObject", userDetails);

In xsp:expr I can do the following:

session.getAttribute("userObject") which returns the object, but what I 
want to do in XSP is to return a property of the object, as you can do 
in jsp/struts is:

<bean:write name="userObject" property="firstName"/>

How would I do this in XSP? Can I do session.getAttribute("userObject", 
propertyName)?


many thanks in advance.