Reputation: 9
I have made a struts action hook and want to add it to the portlet. I tried several things like I made first a portlet plugin project and then tried to add hook into it by right clicking on the portlet project and clicking on New->Liferay Hook Configuration but there is no option of struts action hook there.
So I decided to make hook first. I am now ready with the hook and need to add it to the portlet.
How can I achieve it? Is there any way to add struts action hook to the portlet?
Upvotes: 0
Views: 84
Reputation: 613
You need to prefix struts path of the portlet in which you want to add struts action. You can find struts path for Liferay OOTB portlets in /ROOT/WEB-INF/liferay-portlet.xml.
Example:
Consider you want to add new struts action to message boards portlet. you have to write struts-action-path
in liferay-hook.xml as follow :
<struts-action-path>/message_boards/new_struts_action</struts-action-path>
HTH
Upvotes: 0