| Author |
Using JSP scriptlet in Bean:write tag
|
Amirr Rafique
Ranch Hand
Joined: Nov 14, 2005
Posts: 324
|
|
Hi, How can we use JSP scriptlet in <bean:write> tag e.g. <bean:message key="homepage.text.announcements.text.first"/> Can I do following <bean:message key="homepage.text.announcements.text.first<%=institute%>"/> Where <%institute%> is my variable having different values. Basically I wanna select key dynamically. Anybody can please help Regards
|
"Know where to find the solution and how to use it - that's the secret of success."
|
 |
Merrill Higginson
Ranch Hand
Joined: Feb 15, 2005
Posts: 4864
|
|
The rule with scriptlets used in attributes of a Struts tag is "all or nothing", meaning the entire attribute must be a scriptlet, or no part of it can be a scriptlet. Given this rule, the following should work: <bean:message key='<%="homepage.text.announcements.text.first"+institute%>'/>
|
Merrill
Consultant, Sima Solutions
|
 |
 |
|
|
subject: Using JSP scriptlet in Bean:write tag
|
|
|