If you are using JSTL, this should be straightforward:

<c:out value="${MyClass1.myClass2.name2}"/>

If you are only using the implicit JSP tags, the ones with the "jsp:"
prefix, this is trickier.  You need to use <jsp:useBean/> and
<jsp:setProperty/> to get a reference to the myClass2 property of the
MyClass1 object, then get the name2 property.  What you tried to do was get
the name2 property of the MyClass1 object, which doesn't even exist.

Thomas Gideon
Sr. Software Developer
B2eMarkets

301.230.2236  Tel.
301.230.2248  Fax.
[EMAIL PROTECTED]
www.B2eMarkets.com


> -----Original Message-----
> From: Marcelo Flores A. [mailto:[EMAIL PROTECTED]]
> Sent: Friday, September 27, 2002 9:39 AM
> To: [EMAIL PROTECTED]
> Subject: jsp:getProperty
> 
> 
> 
> I need help...
> 
> I'm have data of javabeans than have other javabeans with attribute.  
> 
> class MyClass1 
> {
>       String name;
>       MyClass2 myClass2;   
> }
> 
> class MyClass2
> {
>       String name2;
> }
> 
> how I have across sintax tag the name2' s value  only with 
> object MyClass1
> 
> <jsp:getProperty name="MyClass1"  property="name2">  throw a error.
> 
> I don't know how do it----
> 
> help me
> 
> 
> 
>      Atte. Marcelo Flores
> [EMAIL PROTECTED]
> 
> 

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

Reply via email to