Changing the value of a property in multiple files in OpenCms


From time to time it is necessary to change the value of some property of a file within the OpenCms, especially when we change a template of a structured content.

In the administration tab there is a feature to change the value of the properties of elements (Content Tools -.> Change property values) but i not found a regular expression when the property is null or empty.

In this case, I found a solution on the internet, where you create a jsp script, it will scan the setted path and its parameters, you will change the properties using the classes of OpenCms API.

Follows the code:

Crédits : Nacho Fernandez