Fórumok

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

thumbnail
Steven Mileham, módosítva 13 év-val korábban

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

New Member Bejegyzések: 10 Csatlakozás dátuma: 2010.11.30. Legújabb bejegyzések
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
Joost Timmerman, módosítva 13 év-val korábban

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

New Member Bejegyzések: 12 Csatlakozás dátuma: 2011.02.14. Legújabb bejegyzések
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).
Anjali Mahna, módosítva 12 év-val korábban

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

New Member Bejegyzések: 4 Csatlakozás dátuma: 2010.07.07. Legújabb bejegyzések
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
Gopal Agrawal, módosítva 11 év-val korábban

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

New Member Bejegyzések: 4 Csatlakozás dátuma: 2011.12.08. Legújabb bejegyzések
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