Results 1 to 5 of 5

Thread: Spring Portlet MVC and friendly URLs in Liferay

  1. #1
    Join Date
    May 2006
    Posts
    6

    Default 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

  2. #2

    Default Spring Portlet MVC and friendly URLs in Liferay

    Hi
    Did you find a resolution to the problem?
    Thanks!

  3. #3
    Join Date
    May 2006
    Posts
    6

    Default

    Yes, I abandoned Spring Portlet MVC replacing it with Liferay's own framework :-(

  4. #4

    Default

    Geez! .. I have opened up a ticket with Liferay .. will let you know what they say.

  5. #5
    Join Date
    Jun 2011
    Posts
    3

    Default 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
  •