Legacy Knowledge Base
Published Jul. 2, 2025

How the Patching Tool Detects Changes to JSP Files

Written By

Zsolt Balogh

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

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

This article explains the limitations of the patching tool (v22 and earlier) when detecting changes to the portal's JSP files.

Resolution

When customizations are deployed to the portal, the patching tool sometimes warns the developers to update the hooks that are deployed. This is an example message:

WARNING: The file html\portlet\journal\select_document_library.jsp was changed by a hook. Only the original version of the file will be overridden. Please merge the changes to your custom development. [hotfix-885-6130]

However, this message may not be displayed every time a JSP is customized because currently the warnings are only printed when the jsps are installed via a hook and if the custom-jsp-global setting is true (which is the default).

There are three methods for customizing JSP files

  1. With a hook and custom-jsp-global set to true: the jsps are copied to the portal web app and the portal jsp files are renamed to *.portal*. The patching tool does detect this change and gives notification. We are only patching the *.portal.jsp files so the customized JSP won’t be touched.
  2. With hooks but custom-jsp-global set to false: these are the application adapter jsps. The jsp files are not copied to the portal web app so the patching tool currently have no chance to detect these changes - there’s no warning. The portal files are patched, the only issue here is that the bug fixes (fixed in the fix pack) are not present on those sites where they have the application adapter applied.
  3. Ext-web: the files from the ext-web are simply copied to the portal web app, the patching tool doesn’t notice this and overwrites them. When they revert the patches, their version will be copied back from backup.

Other Important Details

  • When the documentation discusses “jsp” override, it can be applied to other files within the webapp (jsp, jspf, js, css, other files). This terminology is used by the portal documentation also.
  • Once the fix packs contain a jsp which was modified by a hook, it will always print the warnings.
  • The patching tool does not merge files. It can only override complete files.

Additional Information

For newer versions of the Patching Tool, please see the Understanding Versioning section of the article Patching Tool 1.0.23.

Did this article resolve your issue ?

Legacy Knowledge Base