dynamic attribute within JSP-tag (useBean)

I

iliad

hi!

i use JSP 1.2 and would like to achieve something like this:

<jsp:useBean id='%= Constants.REQ_ATTRIB_ARTICLEBEAN %'
class="com.my.content.ArticleBean" scope="request"/>
FAILURE: "JspTranslate: Runtime Expr Value
"%=Constants.REQ_ATTRIB_ARTICLEBEAN %" is not permitted for attribute
"id" for jsp element jsp:useBean."

I tried also the following, but it didn't work eather...

<jsp:useBean class="com.my.content.ArticleBean" scope="request">
<jsp:attribute name="id">
<%= Constants.REQ_ATTRIB_ARTICLEBEAN %>
</jsp:attribute>
</jsp:useBean>
FAILURE: "JspTranslate: jsp:useBean is missing an id attribute."

Thanks for the help!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top