Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Liferay friendly URL mapping doesn't work properly
There is friendly URL mapping in Liferay 6. But hiding of Liferay parameters doesn't work with Portletfaces bridge in this feature:
liferay-portlet.xml:
friendly-url-routes.xml:
The URL contains liferay parameters (p_p_col_id, p_p_col_count, p_p_mode):
I created simple portlet on Portlet API with the same mapping settings and its url doesn't contains liferay parameters.
liferay-portlet.xml:
<portlet>
<portlet-name>filter</portlet-name>
<friendly-url-mapper-class>com.liferay.portal.kernel.portlet.DefaultFriendlyURLMapper</friendly-url-mapper-class>
<friendly-url-mapping>filter</friendly-url-mapping>
<friendly-url-routes>friendly-url-routes.xml</friendly-url-routes>
<instanceable>true</instanceable>
<private-request-attributes>true</private-request-attributes>
<private-session-attributes>true</private-session-attributes>
<ajaxable>false</ajaxable>
</portlet>friendly-url-routes.xml:
<routes>
<route>
<pattern></pattern>
<ignored-parameter name="p_p_col_id" />
<ignored-parameter name="p_p_col_count" />
<ignored-parameter name="p_p_mode" />
<ignored-parameter name="p_p_state" />
<ignored-parameter name="p_auth" />
<implicit-parameter name="p_p_lifecycle">1</implicit-parameter>
</route>
</routes>The URL contains liferay parameters (p_p_col_id, p_p_col_count, p_p_mode):
http://localhost:8080/en/web/guest/welcome/-/filter?_filter_WAR_jsf20portlet_INSTANCE_aK40__facesViewId=%2Fxhtml%2Ffilter_view.xhtml&p_p_col_count=3&p_p_col_id=column-1&p_p_mode=viewI created simple portlet on Portlet API with the same mapping settings and its url doesn't contains liferay parameters.
We ran into the same problem!
Parsing parameters to the portlet in a manually typed friendly url works just fine, but displaying a friendly url after an JSF action doesn't work - the resulting url looke the the one Denis posted.
We're using Liferay 6.0.6, JSF2 (mojarra) and Portletfaces bridge. Did anyone manage to hide the liferay parameters with a similiar combination, or can suggest a workaround?
Parsing parameters to the portlet in a manually typed friendly url works just fine, but displaying a friendly url after an JSF action doesn't work - the resulting url looke the the one Denis posted.
We're using Liferay 6.0.6, JSF2 (mojarra) and Portletfaces bridge. Did anyone manage to hide the liferay parameters with a similiar combination, or can suggest a workaround?
Hi Denis,
When you get a chance, could you paste the Java code here for your simple portlet?
Thanks,
Neil
Denis Korzh:
I created simple portlet on Portlet API with the same mapping settings and its url doesn't contains liferay parameters.
When you get a chance, could you paste the Java code here for your simple portlet?
Thanks,
Neil
The fix for supporting Liferay Friendly URLs has been committed to Git and backported to all branches. See FACES-257 for more info. Prior to the official release, you can try SNAPSHOT versions of the Liferay Faces JAR artifacts from the snapshot repository.