Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using EL variable in struts bean:message tag(not struts EL tag)

843840Jan 25 2008 — edited Jan 29 2008
Is there any work around to use an EL variable inside struts bean:message tag as key:

I have like this:

<bean:message key="${bean.keyName}"/>


which is throwing error , I know this can be resolved by using struts-el tags but i cannot use them for specific reasons.

I dont want to use bean:define tag to define my 'bean' and then use like this:
<bean:message key="<%=bean.getKeyName%>"/> (this actually works, but i want to use EL variable)

Is there any work around to use EL variable and make the message display on the jsp.

i tried multiple ways like scriplets and jsp:useBean but nothing worked, Please let me know..

Thanks in advance
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 26 2008
Added on Jan 25 2008
3 comments
372 views