-
Nov 3rd, 2010, 09:00 PM
#1
Spring Portlet MVC and friendly URLs in Liferay
Hello,
I am working on a portlet to be deployed in Liferay 6.0.5 container. The portlet uses Spring Portlet MVC annotations. Among other annotations, my controller uses
@ActionMapping(params = "action=performSearch")
to mark the controller method used to handle the search action. The portlet works great.
The portlet stops working when I try to use Liferay's mechanism for friendly URLs (http://www.liferay.com/web/connor.mc...2286/maximized). Instead of a long and ugly URL (generated in response to a form POST), which contains a dozen or so parameters, I create a mapping that shortens the URL considerably. The problem is that with the friendly URL the action handling in the controller no longer works.
I tried many variations of the URL mapping. Originally the mapped URL did not have 'action' parameter (the mapping scheme seems to replace the URL parameters with path elements). Well, I changed the mapping to make sure that ActionMapping uses the request parameter which is part of the URL. Nothing works - the action method is not being invoked.
Why would mapping the URL cause the action mapping to stop working in a portlet? Is there a way to debug action mapping? Is there a way to perform action mapping based on the URL path (like Grails uses /controller/action/id) rather than on URL parameters?
Thank you,
Michael
-
May 2nd, 2011, 10:49 AM
#2
Spring Portlet MVC and friendly URLs in Liferay
Hi
Did you find a resolution to the problem?
Thanks!
-
May 2nd, 2011, 12:12 PM
#3
Yes, I abandoned Spring Portlet MVC replacing it with Liferay's own framework :-(
-
May 3rd, 2011, 08:02 AM
#4
Geez! .. I have opened up a ticket with Liferay .. will let you know what they say.
-
Jun 14th, 2011, 09:04 AM
#5
how to map multiple portlet controllers with @RequestMapping ?
Hi,
I have a question regarding mapping requests to different portlet controllers using spring mvc annotations.
If I do have two portlet controllers, let's say portlet-A controller, Portlet-B controller how to map different portlets with @RequestMapping ? what are the configurations to use in *-portlet.xml .
Thanks in advance.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules