Get the tools you need to learn Java skills fast!
Video tutorials, eBooks, hands-on lab exercises, sample code.
Get started
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 Badass: Making Users Awesome this week in the Game Development 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