<?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>MVCPortlet, SessionMessages and Redirect</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121428214" />
  <subtitle>MVCPortlet, SessionMessages and Redirect</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121428214</id>
  <updated>2026-05-07T05:58:37Z</updated>
  <dc:date>2026-05-07T05:58:37Z</dc:date>
  <entry>
    <title>RE: MVCPortlet, SessionMessages and Redirect</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121904418" />
    <author>
      <name>Vinoth Kumar</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121904418</id>
    <updated>2024-10-23T10:39:37Z</updated>
    <published>2023-07-05T11:59:11Z</published>
    <summary type="html">&lt;p&gt;In this case, Use your success message in redirected page. i.e&lt;/p&gt;
&lt;p&gt;&amp;lt;liferay-ui:success key=&amp;quot;success&amp;quot; message=&amp;quot;Greeting
  saved successfully!&amp;quot; /&amp;gt; in your redirected page. So, you can
  see the message in redirected page.&lt;/p&gt;</summary>
    <dc:creator>Vinoth Kumar</dc:creator>
    <dc:date>2023-07-05T11:59:11Z</dc:date>
  </entry>
  <entry>
    <title>MVCPortlet, SessionMessages and Redirect</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121428213" />
    <author>
      <name>Gennaro Lippiello</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121428213</id>
    <updated>2022-05-23T11:27:10Z</updated>
    <published>2022-05-23T11:27:08Z</published>
    <summary type="html">&lt;p&gt;Hello, in my custom MVCPortlet I have a view.jsp file with inside a
  form which calls a function in my portlet.java file.&lt;br /&gt; After the
  function, if everything is ok I'm calling the method
  &amp;quot;SessionMessages.add(actionRequest,&amp;quot;success&amp;quot;);&amp;quot; in
  order to show a custom success message.&lt;/p&gt;
&lt;p&gt;Everything works fine, but after the success message I need to
  redirect the user on another page. So I thought to add a simple
  redirect
  &amp;quot;actionResponse.sendRedirect(themeDisplay.getURLPortal());&amp;quot;
  after the method that shows the custom message. But in this way the
  redirect is too fast and I have no time to read the success message.&lt;/p&gt;
&lt;p&gt;Which is the best way to show the custom success messagge, give to
  user enought time to read it, and then redirect the page?&lt;br /&gt; It
  would be great if I can show the succes message in a popup, and only
  when the user close the popup he will be redirected. Is this possible?&lt;/p&gt;</summary>
    <dc:creator>Gennaro Lippiello</dc:creator>
    <dc:date>2022-05-23T11:27:08Z</dc:date>
  </entry>
</feed>
