You haven't said what is it that is the problem.  I'll guess that lastName is not 
being displayed.  

Is there supposed to be a default lastName when a WebappUser object is created?  As 
you know that is what will be created when the useBean is encountered.  

Or, is there already a WebappUser object created before this page is loaded?  If so, 
is it under the same id (userSession) and scope (session)?

Sri

-----Original Message-----
From: Seth Milder [mailto:[EMAIL PROTECTED]] 
Sent: Monday, November 18, 2002 4:27 PM
To: Struts Users Mailing List
Subject: Newbie: Nested Tag Trouble


I have a problem with trying to write out subclass properties from 
struts. I a have a class called WebappUser that contains a method

        public Person getPerson(){return(_person);}

and Person then has a method

        public String getLastName(){return(_lastName);}

A WebappUser object is stored in the session and I want to write out the 
lastName property for its Person object. In the JSP, I've tried 
variations of this:

<!------------------------------------------------------>
<jsp:useBean
        id="userSession"
        scope="session"                         
        type="edu.gmu.opentac2.webapp.WebappUser"
/>

.
.
.

<nested:root name="userSession">
    <nested:nest property="person">
    <nested:write property="firstName" />
    </nested:nest>
</nested:root> <!------------------------------------------------------>

I apologize if the answer is obvious, but I could not really find too 
many examples of just how to do this. I am sure someone here will show 
me the errors of my ways, as they have before.

-- 
Seth Milder
Department of Physics and Astronomy
MS 3f3
George Mason University
Fairfax, VA
http://www.mrseth.org
--
The contempt for law and the contempt for the human consequences of 
lawbreaking go from the bottom to the top of American society. MARGARET MEAD


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to