<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>Retrieving ActionMessages inside Portlets</title>
  <link rel="self" href="https://liferay.dev/de/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=46905" />
  <subtitle>Retrieving ActionMessages inside Portlets</subtitle>
  <id>https://liferay.dev/de/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=46905</id>
  <updated>2026-05-08T23:22:02Z</updated>
  <dc:date>2026-05-08T23:22:02Z</dc:date>
  <entry>
    <title>Retrieving ActionMessages inside Portlets</title>
    <link rel="alternate" href="https://liferay.dev/de/c/message_boards/find_message?p_l_id=119785294&amp;messageId=46904" />
    <author>
      <name>mcheit mcheit</name>
    </author>
    <id>https://liferay.dev/de/c/message_boards/find_message?p_l_id=119785294&amp;messageId=46904</id>
    <updated>2005-03-03T17:22:11Z</updated>
    <published>2005-03-03T17:22:11Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi,&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;I&amp;amp;#39;m using struts with liferay, and I can&amp;amp;#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....&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;My key in the ApplicationResources.properties file :&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;test.arg = Club {0} exists&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;In my Action class :&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;pre&gt;&lt;code&gt;
messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage("test.arg", club.getName()));
req.setAttribute(Globals.MESSAGE_KEY, messages);
setForward(req, "getClubsByNameSuccess");
&lt;/code&gt;&lt;/pre&gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;In my JSP page :&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;pre&gt;&lt;code&gt;&amp;lt;logic&amp;amp;#58;messagespresent message="&amp;amp;quot;true&amp;amp;quot;"&amp;gt;
  &amp;lt;html&amp;amp;#58;messages id="&amp;amp;quot;msg&amp;amp;quot;" message="&amp;amp;quot;true&amp;amp;quot;"&amp;gt;
    &amp;lt;div class="&amp;amp;quot;success&amp;amp;quot;"&amp;gt;
      &amp;lt;bean&amp;amp;#58;write name="&amp;amp;quot;msg&amp;amp;quot;/"&amp;gt;
    &amp;lt;/bean&amp;amp;#58;write&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;br&amp;gt;
  &amp;lt;/html&amp;amp;#58;messages&amp;gt;
&amp;lt;/logic&amp;amp;#58;messagespresent&amp;gt;

     No messages in the request
&lt;/code&gt;&lt;/pre&gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;Any help appreciated &amp;amp;#33; Thanks &amp;amp;#33;&amp;lt;br /&amp;gt;&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>mcheit mcheit</dc:creator>
    <dc:date>2005-03-03T17:22:11Z</dc:date>
  </entry>
</feed>
