This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Struts and the fly likes bean:message error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "bean:message error" Watch "bean:message error" New topic

bean:message error

kamesh aru
Ranch Hand

Joined: Mar 16, 2002
Posts: 150
while i am trying to get values from message properties
while iterating using logic:iterate getting error ?

<bean:message key='<bean:write name="user" property="key"/>'/>

[ServletException in:test.jsp] Missing message for key ""'

thanks in advance
alan do
Ranch Hand

Joined: Apr 14, 2005
Posts: 354
i am sorry dave, you can't do that...
the message key struts can't find is <bean:write name="user" property="key"/> as a string. you'll need to do something like <bean:message key="<%=user.getKey()%>"/> or use the corresponding EL tag-lib: <bean-el:message key="${user.key}"/>

-/a<br />certified slacker...yes, my last name is 'do' - <a href="" target="_blank" rel="nofollow"></a>
kamesh aru
Ranch Hand

Joined: Mar 16, 2002
Posts: 150
thank you for the information.
I agree. Here's the link:
subject: bean:message error
It's not a secret anymore!