tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kris Schneider <k...@dotech.com>
Subject Re: Addressing variables with jstl
Date Thu, 13 Oct 2005 20:38:23 GMT
Although I originally wrote it as part of the Struts Wiki, this page is 
helpful for determining the actual properties exposed by your bean/class:

http://wiki.apache.org/struts/ExposedBeanProperties

JSTL should be able to deal with pretty much anything that's exposed as a 
standard JavaBeans property.

Michael Winkler wrote:
> Hi,
> 
>  
> 
> I've . g. two classes:
> 
>  
> 
> public class A {
> 
> private int i;
> 
> ...
> 
> }
> 
>  
> 
> and
> 
>  
> 
> public class B {
> 
> private A a;
> 
> ...
> 
> }
> 
>  
> 
> further in my JSP:
> 
>  
> 
> <jsp:useBean id="B" class="../B"/>
> 
>  
> 
> Now my question: is it possible to address the variable i in Class A with the jstl?
> 
>  
> 
> <jsp:getProperty name="B" property="a"/>
> 
> <c:out value="${a.i}"/> 
> 
> prints the memory address ...
> 
>  
> 
> <c:out value="${B.a.i}"/>
> 
> won't work - i is not public ...
> 
>  
> 
> Of curse it works with:
> 
> <% out.println(B.getA().getI()); %>
> 
> but with jstl?
> 
>  
> 
> I've no idea. Thanks for your Support,
> 
>  
> 
>     Michael

-- 
Kris Schneider <mailto:kris@dotech.com>
D.O.Tech       <http://www.dotech.com/>

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


Mime
View raw message