<?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>Context path after dispath view.jsp not correct in liferay DXP</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=118584591" />
  <subtitle>Context path after dispath view.jsp not correct in liferay DXP</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=118584591</id>
  <updated>2026-04-05T01:45:32Z</updated>
  <dc:date>2026-04-05T01:45:32Z</dc:date>
  <entry>
    <title>RE: Context path after dispath view.jsp not correct in liferay DXP</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118587119" />
    <author>
      <name>David H Nebinger</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118587119</id>
    <updated>2020-02-25T15:16:11Z</updated>
    <published>2020-02-25T15:16:11Z</published>
    <summary type="html">You can change the /o to something else, but you cannot get rid of the /o.&lt;br /&gt;&lt;br /&gt;Normally to accommodate something like this I like to use a rewrite rule in apache or nginx to take the incoming URL that you want to do and send it to the URL that Liferay expects. It&amp;#39;s the best way to keep what you need yet live with what Liferay requires.</summary>
    <dc:creator>David H Nebinger</dc:creator>
    <dc:date>2020-02-25T15:16:11Z</dc:date>
  </entry>
  <entry>
    <title>Context path after dispath view.jsp not correct in liferay DXP</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118584590" />
    <author>
      <name>David Chung</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=118584590</id>
    <updated>2020-02-25T09:55:05Z</updated>
    <published>2020-02-25T09:55:05Z</published>
    <summary type="html">I am using spring MVC with gwt which need dispath to view.jsp and then it push frontend to redirect and it will download some file from server to load the page, but the file context path not correct after deploy to liferay DXP. &lt;br /&gt;The find path should be like that &lt;br /&gt;&lt;a href="https://apps.dev.ehr.gov.hk/epmi-enrol-portlet/enrol/F64334746D8B8661A8B6B1B574032E90.cache.js"&gt;https://&amp;lt;hostname&amp;gt;/&amp;lt;context path&amp;gt;/&amp;lt;source folder&amp;gt;/xxxxxxxxxxxx.cache.js&lt;/a&gt;&lt;br /&gt;but after deploy to liferay DXP change to like this&lt;br /&gt;&lt;a href="https://apps.dev.ehr.gov.hk/epmi-enrol-portlet/enrol/F64334746D8B8661A8B6B1B574032E90.cache.js"&gt;https://&amp;lt;hostname&amp;gt;/xxxxxxxxxxxx.cache.js&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I know that after liferay DXP the file path should change to below and I try to get the file successful by using this path but how can I change the context path under liferay DXP&lt;br /&gt;&lt;a href="https://apps.dev.ehr.gov.hk/epmi-enrol-portlet/enrol/F64334746D8B8661A8B6B1B574032E90.cache.js"&gt;https://&amp;lt;hostname&amp;gt;/o/&amp;lt;context path&amp;gt;/&amp;lt;source folder&amp;gt;/xxxxxxxxxxxx.cache.js&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;GenericPortlet.java&lt;br /&gt;    @Override&lt;br /&gt;    protected void doView(RenderRequest request, RenderResponse response)&lt;br /&gt;            throws PortletException, IOException {&lt;br /&gt;            &lt;br /&gt;        request.setAttribute(&amp;#34;DEFAULT_RENDER_URL&amp;#34;, response.createRenderURL().toString());&lt;br /&gt;        &lt;br /&gt;        response.setContentType(request.getResponseContentType());&lt;br /&gt;        String url = &amp;#34;/WEB-INF/jsp/view.jsp&amp;#34;;&lt;br /&gt;        getPortletContext().getRequestDispatcher(url).include(request, response);&lt;br /&gt;    }&lt;br /&gt; </summary>
    <dc:creator>David Chung</dc:creator>
    <dc:date>2020-02-25T09:55:05Z</dc:date>
  </entry>
</feed>
