Liferay DXP Free Tier    |    From download to running in minutes    |    Get started →

Blogs

Migrating a plugin from LRP 4.4.2 to LRP 5.0.1: URL escaped

Alvaro Del Castillo
Alvaro Del Castillo
読了時間: 1分未満

In the process of migrating the Document Publisher portlet from LRP 4.4.2 to 5.0.1 one of the problems I have found is that in LRP 5.0.1 the URLs for actions and renders in some cases, like URLs generated from Javascript, are escaped so they won't work anymore because the params could not be parsed correctly from the URL. To solve it you need to add to the "portletl.xml" file:

<?xml version="1.0"?>
<portlet-app xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd"

version="2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:schemaLocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd

http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd">
    <portlet>

...
    </portlet>
    <container-runtime-option>
        <name>javax.portlet.escapeXml</name>
        <value>false</value>
    </container-runtime-option>   
</portlet-app>

In the forums you could read a nice discussion about this change that broken backward compatibility but that it is need to comply with JSR-286. It seems that in 5.0.2 the default will be to put escapeXml to false but in any case, it is important to record the issues about this configuration param.

 

 

ページコメント

Related Assets...

結果が見つかりません。

More Blog Entries...

Himanshu Chauhan
11月 20, 2026
Tony Lim
11月 19, 2026