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

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.

 

 

Blogs
Thanks a lottttttttttttttttttttttttttttttt........
i was trying a portlet from a week, but i got result by seeing your blog.