aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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.
It is sorta covered in the JavaRanch Style Guide.
subject: bean:message error
Similar Threads
Cannot retrieve definition for form bean null
LogonView.jsp Displays A Blank Page
Struts error message
One more message-resources in struts-config.xml
LookupDispatchAction with link, Please Help Me!!!