Forums

Home » Liferay Portal » English » 3. Development

Combination View Flat View Tree View
Threads [ Previous | Next ]
Jan Tošovský
Portlet URL doesn't invoke struts action
December 21, 2011 8:38 AM
Answer

Jan Tošovský

Rank: Expert

Posts: 341

Join Date: July 22, 2010

Recent Posts

Hello,

I have a clone of Activities portlet with some filtering implemented.

In struts-config-ext it is properly mapped, so the following URL executes strutsExecute method of my class as expected:
http://localhost:8080/c/community_activities/rss

When in JSP the link is created this way:
ResourceURL rssURL = liferayPortletResponse.createResourceURL();
rssURL.setCacheability(ResourceURL.FULL);
rssURL.setParameter("struts_action", "/community_activities/rss");

it returns URL, which does nothing.
Originally I used friendly URL mapping and that URL was really in the expected friendly URL form: http://localhost:8080/web/guest/home/-/community_activities/rss
But when nothing was executed, I switched that mapping offf. But the same problem.

In my class I override both strutsExecute and serveResource methods (just print a log message).

I probably missing something. Any idea?

Regards,
Jan