<?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>Duplicated success alert from StrutsAction</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=119970064" />
  <subtitle>Duplicated success alert from StrutsAction</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=119970064</id>
  <updated>2026-04-06T15:30:02Z</updated>
  <dc:date>2026-04-06T15:30:02Z</dc:date>
  <entry>
    <title>Duplicated success alert from StrutsAction</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119970063" />
    <author>
      <name>Václav Suchánek</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=119970063</id>
    <updated>2020-09-18T11:43:42Z</updated>
    <published>2020-09-18T11:43:42Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hello,&lt;br&gt;&lt;br&gt;I have following scenario:&lt;br&gt;I have created a custom module where I applied StrutsAction:&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;@Component(
        immediate = true, property = "path=/portal/customModule/find_entry",
        service = StrutsAction.class
)
public class FindEntryAction extends FindStrutsAction {...}&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;Inside of it I'm overriding:&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;@Override
public String execute(HttpServletRequest request, HttpServletResponse response) throws Exception {
    SessionMessages.add(request, "request_processed", "test");

    super.execute(request, response);

    return null;
}&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;And If i redeploy module and render it so the result is following:&lt;br&gt;&lt;br&gt;&lt;img src="/documents/portlet_file_entry/14/image--tempRandomSuffix--7lYAx38g.png/8df67cfe-4846-c4df-5537-1a4f573e5092"&gt;&lt;br&gt;&lt;br&gt;Alert Message is displayed six times. This number (6) is related to the number of rendered portlets on the page - for every portlet layout is this message rendered. I did some tests and if I remove one portlet from the page so there will be only 5 these messages rendered and so on.&lt;br&gt;&lt;br&gt;It looks like a bug for me. But maybe I missed something.&lt;br&gt;&lt;br&gt;Is there any other way how to add message to SessionMessages? Can I add some namespace or portlet id?&lt;br&gt;&lt;br&gt;&lt;strong&gt;Expected Result:&lt;/strong&gt;&lt;br&gt;Alert is displayed only once.&lt;br&gt;&lt;strong&gt;Actual Result:&lt;br&gt;&lt;/strong&gt;Alert is displayed six times.&lt;br&gt;&lt;br&gt;Tested on:&lt;br&gt;Liferay 7.3.4 GA5 (&lt;a href="https://releases-cdn.liferay.com/portal/7.3.4-ga5/liferay-ce-portal-tomcat-7.3.4-ga5-20200811154319029.tar.gz"&gt;https://releases-cdn.liferay.com/portal/7.3.4-ga5/liferay-ce-portal-tomcat-7.3.4-ga5-20200811154319029.tar.gz&lt;/a&gt;)&lt;br&gt;Server version: Apache Tomcat/9.0.33&lt;br&gt;OS Name: Windows 10&lt;br&gt;JVM Version: 1.8.0_144-b01&lt;br&gt;PostgreSQL&lt;br&gt;Maven workspace&lt;br&gt;IDE: IntelliJ IDEA 2020.2 (Ultimate Edition) Build #IU-202.6397.94, built on July 27, 2020&lt;br&gt;&lt;br&gt;Thanks in advance.&lt;br&gt;&lt;br&gt;Vaclav&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Václav Suchánek</dc:creator>
    <dc:date>2020-09-18T11:43:42Z</dc:date>
  </entry>
</feed>
