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 Murach's Java Servlets and JSP this week in the Servlets 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="http://www.luckycouple.com" target="_blank" rel="nofollow">luckycouple.com</a>
kamesh aru
Ranch Hand

Joined: Mar 16, 2002
Posts: 150
thank you for the information.
wood burning stoves
subject: bean:message error
Similar Threads
Cannot retrieve definition for form bean null
Struts error message
LookupDispatchAction with link, Please Help Me!!!
LogonView.jsp Displays A Blank Page
One more message-resources in struts-config.xml