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
Menys d'un minut de lectura

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.

 

 

Comentaris de la pàgina
Thanks a lottttttttttttttttttttttttttttttt........
i was trying a portlet from a week, but i got result by seeing your blog.

Related Assets...

No s'ha trobat cap resultat

More Blog Entries...

Ben Turner
de novembre 26, 2026
Himanshu Chauhan
de novembre 20, 2026
Tony Lim
de novembre 19, 2026