留言板

Friendly URL

Suresh Kumar,修改在11 年前。

Friendly URL

Junior Member 帖子: 47 加入日期: 12-5-9 最近的帖子


Hi i have my liferay-portlet.xml and xxx-friendly-url-routes.xml like below.

liferay-portlet.xml
<portlet>
<portlet-name>38</portlet-name>
<icon>/icon.png</icon>

<friendly-url-mapper-class>com.liferay.portal.kernel.portlet.DefaultFriendlyURLMapper</friendly-url-mapper-class>
<friendly-url-mapping>xxx</friendly-url-mapping>
<friendly-url-routes>com/liferay/samples/xxx-friendly-url-routes.xml</friendly-url-routes>

<instanceable>false</instanceable>
<private-session-attributes>false</private-session-attributes>
<header-portlet-css>/css/main.css</header-portlet-css>
<footer-portlet-javascript>/js/main.js</footer-portlet-javascript>
<css-class-wrapper>xxx-portlet</css-class-wrapper>
<add-default-resource>true</add-default-resource>
</portlet>


xxx-friendly-url-routes.xml
<?xml version="1.0"?>
<!DOCTYPE routes PUBLIC "-//Liferay//DTD Friendly URL Routes 6.1.0//EN"
"http://www.liferay.com/dtd/liferay-friendly-url-routes_6_1_0.dtd">


<routes>
<route>
<pattern>/aaa</pattern>
<generated-parameter name="mvcPath">/aaa-portlet/docroot/jsp/aaa/xxx.jsp</generated-parameter>
</route>
</routes>

------------------------------------------

but with the above code, I am not able to get the friendly URL. I am getting the same lengthy URL.

Please assist.

Thanks in advance,
Suresh
thumbnail
Raja Nagendra Kumar,修改在11 年前。

RE: Friendly URL

Expert 帖子: 484 加入日期: 06-3-2 最近的帖子
Can you change the pattern path with a regular expression one say .* and try

More info at

http://www.liferay.com/community/forums/-/message_boards/message/9802521

Regards,
Raja Nagendra Kumar,
www.tejasoft.com