liferay-portlet.xml for Friendly URL mapping in Liferay

When I configure friendly url based on Chapter 10 of Liferay in Action, it says place the following code right after <icon>. I think the book says that based on slogan project. If we configure other stuff after <icon>, it might be wrong.

<friendly-url-mapper-class>
com.liferay.portal.kernel.portlet.DefaultFriendlyURLMapper
</friendly-url-mapper-class>
<friendly-url-mapping>SpringBookReceiver</friendly-url-mapping>
<friendly-url-routes>
com/book/controller/book-friendly-url-routes.xml
</friendly-url-routes>

The thing is our elements must match dtd, the order is like below:

The content of element type "portlet" must match "(portlet-name,icon?,virtual-path?,struts-path?,parent-struts-path?,configuration-path?,configuration-action-class?,indexer-
 class*,open-search-class?,scheduler-entry*,portlet-url-class?,friendly-url-mapper-class?,friendly-url-mapping?,friendly-url-routes?,url-encoder-class?,portlet-data-handler-class?,portlet-
 layout-listener-class?,poller-processor-class?,pop-message-listener-class?,social-activity-interpreter-class?,social-request-interpreter-class?,webdav-storage-token?,webdav-storage-
 class?,xml-rpc-method-class?,control-panel-entry-category?,control-panel-entry-weight?,control-panel-entry-class?,asset-renderer-factory*,atom-collection-adapter*,custom-attributes-
 display*,permission-propagator?,workflow-handler*,preferences-company-wide?,preferences-unique-per-layout?,preferences-owned-by-group?,use-default-template?,show-portlet-
 access-denied?,show-portlet-inactive?,action-url-redirect?,restore-current-view?,maximize-edit?,maximize-help?,pop-up-print?,layout-
 cacheable?,instanceable?,remoteable?,scopeable?,user-principal-strategy?,private-request-attributes?,private-session-attributes?,autopropagated-parameters?,action-timeout?,render-
 timeout?,render-weight?,ajaxable?,header-portal-css*,header-portlet-css*,header-portal-javascript*,header-portlet-javascript*,footer-portal-css*,footer-portlet-css*,footer-portal-
 javascript*,footer-portlet-javascript*,css-class-wrapper?,facebook-integration?,add-default-resource?,system?,active?,include?)".


If you follow the order, you can't get error.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值