struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurie Harper <>
Subject Re: jstl - define bean
Date Thu, 19 May 2005 23:22:06 GMT
Grzegorz Stasica wrote:

> I thought <c:set ...> defines a new bean in page scope. If this is true 

No, c:set sets a property on a bean that is already defined.

> I do not understand why attached code keeps throwing exception that no 
> getB() is not defined.
> <c:set property="b" value="kicha" var="d"></c:set>

This is equivalent to <% d.setB("kicha"); %>

> <html:link forward="gtLogin" paramId="ddd" paramName="d" 
> paramProperty="b">Login</html:link>

You're telling the html:link tag to create a parameter named 'ddd' whose 
value is taken from the property B of bean d. In other words, you're 
telling it to add a parameter whose value is d.getB(). If d's type 
doesn't define the accessor properly, Struts won't be able to call it.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message