legacy-knowledge-base
公開されました Sep. 10, 2025

Is it possible to block direct access to a portlet render URL?

written-by

Jose L. Bango

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

Issue

  • We would like prevent direct access to portlet render URLs (/c/portal/render_portlet) that bypass normal navigation within the portal. 
  • These portlets have been manually added to the page.
  • Example URL:
    /c/portal/render_portlet?p_l_id=17&p_p_id=com_acme_z3x1_portlet_MyPortlet_INSTANCE_X4QSG&p_p_lifecycle=2

Environment

  • Any Liferay DXP Version

Resolution

There is no supported way to block these URLs out of the box. Out-of-the-box portlet permissions are not granular enough to cover this use case.

Possible workarounds include:

  1. Blocking the URL pattern in the app server/web server.
  2. Adding a custom portlet filter to restrict, intercept, and block the portlet rendering if it is not loaded within a page.

However, note that these approaches are not recommended as they might cause unexpected behavior.

did-this-article-resolve-your-issue

legacy-knowledge-base