<?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>Doubts about redirection</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=120808995" />
  <subtitle>Doubts about redirection</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=120808995</id>
  <updated>2026-04-05T15:24:31Z</updated>
  <dc:date>2026-04-05T15:24:31Z</dc:date>
  <entry>
    <title>RE: Doubts about redirection</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120806973" />
    <author>
      <name>Mohammed Yasin</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120806973</id>
    <updated>2021-05-25T11:28:05Z</updated>
    <published>2021-05-25T11:28:05Z</published>
    <summary type="html">&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;You can form a URL by using PortletURLFactory and redirect to
  specific page and jsp, You can refer below example&lt;/p&gt;
&lt;pre&gt;&lt;code class="language-java"&gt;Layout layout = LayoutLocalServiceUtil.fetchLayoutByFriendlyURL(groupId, privateLayout, &amp;quot;/newPage &amp;quot;);

PortletURL portletURL = PortletURLFactoryUtil.create(actionRequest, &amp;quot;yourportletid&amp;quot;, layout,PortletRequest.RENDER_PHASE);
portletURL.setParameter(&amp;quot;jspPage&amp;quot;, &amp;quot;/newpage.jsp&amp;quot;);

actionResponse.sendRedirect(portletURL.toString());&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>Mohammed Yasin</dc:creator>
    <dc:date>2021-05-25T11:28:05Z</dc:date>
  </entry>
  <entry>
    <title>Doubts about redirection</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120808994" />
    <author>
      <name>Daniel G</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120808994</id>
    <updated>2021-05-25T08:55:43Z</updated>
    <published>2021-05-25T08:55:43Z</published>
    <summary type="html">&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;I am making a portlet, with a combo for selecting fields, and then it
  has to redirect to another page and show another jsp different. Is it possible?&lt;/p&gt;
&lt;p&gt;For instance, I have the portlet in /home, which shows view.jsp, and
  when a button is pressed, I want that the portlet redirects to
  /newPage and then shows the newpage.jsp&lt;/p&gt;
&lt;p&gt;I try with actionResponse.sendRedirect but I am not able to find a
  way to specify which jsp shows. Is there any option of select what jsp
  has to be shown in doView method?&lt;/p&gt;
&lt;p&gt;Any ideas would be very appreciated&lt;/p&gt;
&lt;p&gt;Thanks in advance&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;</summary>
    <dc:creator>Daniel G</dc:creator>
    <dc:date>2021-05-25T08:55:43Z</dc:date>
  </entry>
</feed>
