<?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>How can I redirect to any global URL from my portlet or through liferay?</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=120682878" />
  <subtitle>How can I redirect to any global URL from my portlet or through liferay?</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=120682878</id>
  <updated>2026-04-07T21:40:32Z</updated>
  <dc:date>2026-04-07T21:40:32Z</dc:date>
  <entry>
    <title>RE: How can I redirect to any global URL from my portlet or through liferay</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120683694" />
    <author>
      <name>Vilmos Papp</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120683694</id>
    <updated>2021-03-12T08:54:17Z</updated>
    <published>2021-03-12T08:54:17Z</published>
    <summary type="html">&lt;p&gt;What is your use-case you want to achieve? Probably we can recommend
  alternative solution, but as Matthew wrote, basically you can do
  redirect in the action. Probably resource lifecycle can be also used,
  but again, please let us know about what is your use-case.&lt;/p&gt;</summary>
    <dc:creator>Vilmos Papp</dc:creator>
    <dc:date>2021-03-12T08:54:17Z</dc:date>
  </entry>
  <entry>
    <title>RE: How can I redirect to any global URL from my portlet or through liferay</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120681418" />
    <author>
      <name>Matthew K.</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120681418</id>
    <updated>2021-03-11T16:56:32Z</updated>
    <published>2021-03-11T16:56:32Z</published>
    <summary type="html">&lt;p&gt;I guess it is not possible to do a redirect in the render lifecycle
  of a portlet. You have to do it in the action lifecycle.&lt;/p&gt;
&lt;p&gt;As an alternative you can just put a little javascript code into your
  view.jsp and do your redirect there.&lt;/p&gt;</summary>
    <dc:creator>Matthew K.</dc:creator>
    <dc:date>2021-03-11T16:56:32Z</dc:date>
  </entry>
  <entry>
    <title>How can I redirect to any global URL from my portlet or through liferay?</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120682877" />
    <author>
      <name>Maulin Patel</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=120682877</id>
    <updated>2021-03-10T12:48:20Z</updated>
    <published>2021-03-10T12:48:20Z</published>
    <summary type="html">&lt;p&gt;Hi Team,&lt;br /&gt;I want to redirect to any gloab like URL like 'www.google.com'&lt;br /&gt;
  &lt;br /&gt;I have tried the following code to redirect to the
  'www.google.com' but it is not redirecting.&lt;/p&gt;
&lt;p&gt;@RenderMapping&lt;br /&gt;    public ModelAndView proxy(RenderRequest
  request, RenderResponse response)&lt;br /&gt;            throws
  PortalException, SystemException {&lt;br /&gt;        ModelAndView mv = new
  ModelAndView();&lt;br /&gt;        try {&lt;br /&gt;          
   logger.debug(&amp;quot;Redirecting to proxy page&amp;quot;);&lt;br /&gt;          
   &lt;br /&gt;            HttpServletResponse res =
  PortalUtil.getHttpServletResponse(response);&lt;br /&gt;            res.sendRedirect(&amp;quot;http://13.234.123.64:8080/cv/images/20201211-131135-2796/C0002007193A02.pdf&amp;quot;);&lt;br /&gt;
  &lt;br /&gt;        } catch (Exception e) {&lt;br /&gt;          
   logger.error(&amp;quot;proxyCVTempURL Error : {}&amp;quot;, e);&lt;br /&gt;      
   }&lt;br /&gt;        return mv;&lt;br /&gt;    }&lt;/p&gt;
&lt;p&gt; &lt;/p&gt;
&lt;p&gt;Can you please help me out to redirect to any URL.&lt;/p&gt;</summary>
    <dc:creator>Maulin Patel</dc:creator>
    <dc:date>2021-03-10T12:48:20Z</dc:date>
  </entry>
</feed>
