Retrieving ActionMessages inside Portlets

13296, geändert vor 21 Jahren. Junior Member Beiträge: 28 Beitrittsdatum: 16.02.05 Neueste Beiträge
Hi,<br /><br />I&#39;m using struts with liferay, and I can&#39;t manage to retrieve my ActionMessages stored in the request by an Action class. Actually, I use setAttribute on the request, but the forwarding to the jsp seems to reformat my request, and in the same time, lose my ActionMessages....<br /><br />My key in the ApplicationResources.properties file :<br /><br />test.arg = Club {0} exists<br /><br /><br />In my Action class :<br /><br />

messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("test.arg", club.getName()));
req.setAttribute(Globals.MESSAGE_KEY, messages);
setForward(req, "getClubsByNameSuccess");
<br /><br />In my JSP page :<br /><br />
<logic&#58;messagespresent message="&quot;true&quot;">
  <html&#58;messages id="&quot;msg&quot;" message="&quot;true&quot;">
    <div class="&quot;success&quot;">
      <bean&#58;write name="&quot;msg&quot;/">
    </bean&#58;write></div><br>
  </html&#58;messages>
</logic&#58;messagespresent>

     No messages in the request
<br /><br /><br />Any help appreciated &#33; Thanks &#33;<br />