Reputation: 3415
Is it possible to use EL expression inside tag attribute?
I wrote following code
<jsp:useBean id="beans" class="pl.adamski.heroku.Beans"/>
<jsp:useBean id="questions" class="${beans.questionManager}"/>
but it doesn't compile, I get following error:
The value for the useBean class attribute ${beans.questionManager} is invalid
Upvotes: 1
Views: 160
Reputation: 250
According to the documentation the class attribute does not allow the EL
"class="package.class" Instantiates a bean from a class, using the new keyword and the class constructor. The class must not be abstract and must have a public, no−argument constructor. The package and class name are case sensitive." see Oracle docs
Upvotes: 1