Search code examples
jsphookliferayliferay-6

Overriding Liferay JSP using a hook


I'm trying to override a JSP in Liferay 6.1, namely html/portlet/enterprise_admin/settings/authentication.jsp.

I have

  • created a hook (using Eclipse, if that matters)
  • added <custom-jsp-dir>/WEB-INF/jsps</custom-jsp-dir> to liferay-hook.xml
  • created the abovementioned directory structure
  • copied authentication.jsp there and modified it
  • deployed the hook
  • (restarted the server, you never know...)

Deployment seems to work fine. On the server I now have authentication.jsp and authentication.portal.jsp and the former contains my changes.

However, I don't see any changes when I go Portal Settings -> Authentication

What am I missing?


Solution

  • I guess the path is incorrect. The authentication.jsp's correct path is

    /portal-web/docroot/html/portlet/portal_settings/authentication.jsp

    I checked the source, and in Liferay 6.1, there is no portlet called enterprise admin.

    So please change the folder structure.