开发者

How to make my Spring portlet URL Friendly?

开发者 https://www.devze.com 2023-04-04 06:54 出处:网络
I understand that there is a way to have friendly URLs using LiferayMVC but how do I do this using Spring Portlets for Liferay?

I understand that there is a way to have friendly URLs using LiferayMVC but how do I do this using Spring Portlets for Liferay?

I currently have "ugly" URLs such as:

http://localhost:8080/web/myportlet/home?p_p_state=normal&p_p_lifecycle=0&p_p_id=SpringTest_WAR_SpringTestportlet_INSTANCE_9wUi&p_p_col_count=3&p_p_col_开发者_运维知识库id=column-1&_SpringTest_WAR_SpringTestportlet_INSTANCE_9wUi_action=main&p_p_mode=view


You can create friendly URLs for Spring portlets using the same method you'd make them for the Liferay MVC portlet.

See Connor's blog post @ http://www.liferay.com/web/connor.mckay/blog/-/blogs/5262286 on how to make them.


You can follow same procedure describe in Connor's blog post, No difference.

Liferay6 make it simple to have friendly URL, we just need to add some entries into XML file,

1) Route.xml under src folder, This helps to describe the route mechanism for URLs

2) Give path of route.xml into the liferay-portlet.xml

No Java class...!!!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号