views:

19

answers:

1

I'm trying to use "auto wiring" between request attributes and a bean with

<jsp:useBean id="cib" class="(fqn).CarInfoWebBean" scope="request">
    <jsp:setProperty name="cib" property="*" /></jsp:useBean>  

but the setter of the (only) property doesn't get called.

The bean property is of type long, and the property name and attribute name are matching.
The strange thing is that

<jsp:setProperty name="cib" property="carId" param="carId"/>

isn't working either, but

<jsp:setProperty name="cib" property="carId" value="${carId}"/>

is working just fine.

A: 

It turns out that param attribute and property(*) can get only request parameters, not request attributes...

cbaby
As a side-bar, use jstl and el for more concise property selection.
Peter DeWeese