Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Steven Mileham
Portlet Friendly URL Mapper and Full Stop (.) Character in Liferay 6
January 26, 2011 8:15 AM
Answer

Steven Mileham

Rank: New Member

Posts: 10

Join Date: November 30, 2010

Recent Posts

Guys,

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;

http://www.liferay.com/page/-/friendly/value/5.00/
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?

Cheers

Steve
Joost .
RE: Portlet Friendly URL Mapper and Full Stop (.) Character in Liferay 6
February 14, 2011 6:02 AM
Answer

Joost .

Rank: New Member

Posts: 12

Join Date: February 14, 2011

Recent Posts

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?

1http://example.net/page/-/portletx/non-functional@emailaddress
2request.getParameter("email") = "non-functional@emailaddress"
3
4http://example.net/page/-/portletx/myemail@domain.com or
5http://example.net/page/-/portletx/myemail@domain.com/
6request.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
RE: Portlet Friendly URL Mapper and Full Stop (.) Character in Liferay 6
November 28, 2011 11:40 AM
Answer

Anjali Mahna

Rank: New Member

Posts: 4

Join Date: July 7, 2010

Recent Posts

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
Gopal Agrawal
RE: Portlet Friendly URL Mapper and Full Stop (.) Character in Liferay 6
May 13, 2012 7:37 AM
Answer

Gopal Agrawal

Rank: New Member

Posts: 4

Join Date: December 8, 2011

Recent Posts

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