开发者

useBean setProperty not behaving as advertised

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="car开发者_如何学GoId"/>

isn't working either, but

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

is working just fine.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜