掲示板

Portlet Friendly URL Mapper and Full Stop (.) Character in Liferay 6

thumbnail
13年前 に Steven Mileham によって更新されました。

Portlet Friendly URL Mapper and Full Stop (.) Character in Liferay 6

New Member 投稿: 10 参加年月日: 10/11/30 最新の投稿
Guys,

[indent]Seems like we're having a problem with Friendly URL's for portlets.

In Liferay 5.2.3 we wrote our own Friendly URL Mappers which working the following way;

[indent]http://www.liferay.com/page/-/friendly/value/5.00/[/indent]
We are now in the process of upgrading to Liferay 6 (EE) and have begun using the new DefaultFriendlyURLMapper with a routes.xml and mapping settings.

The issue we are facing is that the (.) character is no longer accepted, causing the friendly url to break.

Has anyone else seen this, is this a bug, or a feature of the new system?
[/indent]
Cheers

Steve
13年前 に Joost Timmerman によって更新されました。

RE: Portlet Friendly URL Mapper and Full Stop (.) Character in Liferay 6

New Member 投稿: 12 参加年月日: 11/02/14 最新の投稿
I am experiencing the same problem. I am using 6.0.5 in Tomcat and implemented a pretty basic friendly url in my portlet (by using the defaultfriendlyurlmapper).

In my case, i'm trying to open a portlet which gets an emailaddress as a parameters. The domain part contains (obviously) a dot, this causes the problem. Maybe because Liferay expects anything behind the last dot to be a file-extension?

http://example.net/page/-/portletx/non-functional@emailaddress
request.getParameter("email") = "non-functional@emailaddress"

http://example.net/page/-/portletx/myemail@domain.com or 
http://example.net/page/-/portletx/myemail@domain.com/
request.getParameter("email") = null


I've tried replacing the . (dot) with %2E, but my browser thinks i'm crazy and changes it back to the dot. I've also checked the source for the DefaultFriendlyUrlMapper to see if i can override it, but in don't see any code that works with the dot.

I don't want to get into manually encoding the emailaddress (like change . to _), since i expect a load of trouble (consider addresses like my_name@domain.com or hello@english.co.uk).
12年前 に Anjali Mahna によって更新されました。

RE: Portlet Friendly URL Mapper and Full Stop (.) Character in Liferay 6

New Member 投稿: 4 参加年月日: 10/07/07 最新の投稿
Is there a work-around for this ? Can friendly url mapping be supported if the dot character is part of the friendly url or is the only resort to do some unseemly url rewriting ?


Thanks
thumbnail
11年前 に Gopal Agrawal によって更新されました。

RE: Portlet Friendly URL Mapper and Full Stop (.) Character in Liferay 6

New Member 投稿: 4 参加年月日: 11/12/08 最新の投稿
I am seeing the same issue. However, currently for a workaround, I am replacing . with _-_ and then changing it back in action.
I am using Liferay 6.0.6 with Jboss.

Thanks