As I mentioned in a comment of an answer to this question, the problem is with Liferay 6.2 because IBM WebSphere and previous versions of Liferay are working as expected.
To solve this problem, I added the element <requires-namespaced-parameters>false</requires-namespaced-parameters>
to the liferay-portlet.xml
of the /WEB-INF
directory of the portlet. By doing this, the parameters of the HTML forms are not "namespaced".
Example of /WEB-INF/liferay-portlet.xml
:
<?xml version="1.0" encoding="UTF-8"?>
<liferay-portlet-app>
<portlet>
<portlet-name>Portlet name</portlet-name>
<requires-namespaced-parameters>false</requires-namespaced-parameters>
<instanceable>true</instanceable>
<ajaxable>false</ajaxable>
</portlet>
</liferay-portlet-app>
If you add this element to the liferay-portlet.xml
, the portlet still works correctly in previous versions of Liferay (I tested with versions 5.5 and 6.1). It also works with other portlet contains because they ignore this file.
I claim that Liferay is behaving incorrectly because the JSR-286 spec says the following (top the page 76 of the spec):
If portlets namespace or encode URL parameters or form parameters they are also responsible for removing the namespace. The portlet container will not remove any namespacing the portlet has done on these parameters."