【发布时间】:2014-11-13 20:43:03
【问题描述】:
是否可以在标签属性中使用EL表达式?
我写了以下代码
<jsp:useBean id="beans" class="pl.adamski.heroku.Beans"/>
<jsp:useBean id="questions" class="${beans.questionManager}"/>
但它没有编译,我收到以下错误:
The value for the useBean class attribute ${beans.questionManager} is invalid
【问题讨论】:
-
不是那样的,不。如果你想在 html 标签的属性中使用它,那很好,但是你将它放在一个 jsp:useBean 标签中,它在 EL 之前处理。