<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>How to call the struts action (in ext) from a portlet ??</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=14365665" />
  <subtitle>How to call the struts action (in ext) from a portlet ??</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=14365665</id>
  <updated>2026-06-03T01:57:00Z</updated>
  <dc:date>2026-06-03T01:57:00Z</dc:date>
  <entry>
    <title>RE: How to call the struts action (in ext) from a portlet ??</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=23205779" />
    <author>
      <name>Priya Pratheep</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=23205779</id>
    <updated>2013-04-01T03:34:19Z</updated>
    <published>2013-04-01T03:34:19Z</published>
    <summary type="html">&lt;html&gt;&lt;head&gt;&lt;/head&gt;&lt;body&gt;Hi I am new to struts and Liferay I don't know how to handle my code in tiles-defs.xml Below is my code&lt;br&gt;&lt;br&gt;&lt;br&gt;&lt;strong&gt;ProjectMgmtAction .java&lt;/strong&gt;&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;public class ProjectMgmtAction extends Action{
	
	private Logger logger = LogManager.getLogger(ProjectMgmtAction.class);
	@Override
	public ActionForward execute(ActionMapping mapping, ActionForm form,HttpServletRequest request, HttpServletResponse response) throws Exception{
		
		logger.debug("----------------------- inside ProjectMgmtAction --------------------------------");
		if (form!=null)
			logger.debug("form = " +form.getClass().toString());
		else
			logger.debug("form=null");
		if (form==null){
			String userid = request.getRemoteUser();
			logger.debug("userid = " +userid);
			request.setAttribute("APSE_USER_ID", userid);
		}
		else if (form instanceof DynaActionForm){
			logger.debug("----------------------- inside DynaActionForm --------------------------------");
			
			DynaActionForm actionform=(DynaActionForm)form;
		
		    String procode = (String)actionform.get("procode");
			request.setAttribute("procode", procode);			
	
		}
		else
			logger.error("form is not instanceof DynaActionForm");
			
		return mapping.findForward("continue");
	}
}&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;&lt;strong&gt;portlet.xml &lt;/strong&gt;&lt;br&gt;&lt;br&gt;&lt;pre&gt;&lt;code&gt;	&amp;lt;portlet-name&amp;gt;apse-projectmgmt-portlet&amp;lt;/portlet-name&amp;gt;
		&amp;lt;display-name&amp;gt;APSE Project Management&amp;lt;/display-name&amp;gt;
		&amp;lt;portlet-class&amp;gt;com.bmtap.apse.projectmgmt.portlet.ProjectMgmtPortlet&amp;lt;/portlet-class&amp;gt;
		&amp;lt;init-param&amp;gt;
			&amp;lt;name&amp;gt;ServletContextProvider&amp;lt;/name&amp;gt;
			&amp;lt;value&amp;gt;com.liferay.util.bridges.struts.LiferayServletContextProviderWrapper&amp;lt;/value&amp;gt;
		&amp;lt;/init-param&amp;gt;
		&amp;lt;init-param&amp;gt;
			&amp;lt;name&amp;gt;ViewPage&amp;lt;/name&amp;gt;
			&amp;lt;value&amp;gt;/apse-projectmgmt-portlet/portlet_action/apse-projectmgmt-portlet/viewAction&amp;lt;/value&amp;gt;
		&amp;lt;/init-param&amp;gt; 
		
		&amp;lt;init-param&amp;gt;
			&amp;lt;name&amp;gt;view-action&amp;lt;/name&amp;gt;
			&amp;lt;value&amp;gt;/portlet_action/apse-projectmgmt-portlet/viewAction1&amp;lt;/value&amp;gt;
		&amp;lt;/init-param&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;struts-config.xml file&lt;br&gt;&lt;pre&gt;&lt;code&gt;	&amp;lt;action path="/portlet_action/apse-projectmgmt-portlet/viewAction1" type="com.bmtap.apse.projectmgmt.action.ProjectMgmtAction"&amp;gt;
			&amp;lt;forward name="continue" path="/jsp/project_costingsheet2.jsp"&amp;gt;&amp;lt;/forward&amp;gt;			
		&amp;lt;/action&amp;gt;

		&amp;lt;action attribute="projectCostingSheetForm2" name="DynaFormBean" path="/apse-projectmgmt-portlet/projectCostingSheetAction2" type="com.bmtap.apse.projectmgmt.action.ProjectMgmtAction"&amp;gt;
			&amp;lt;forward name="continue" path="/jsp/project_costingsheet2.jsp"&amp;gt;&amp;lt;/forward&amp;gt;
		&amp;lt;/action&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;I want to call project_costingsheet2.jsp from portlet B&lt;br&gt;1. onClick of link in Portlet A, I want display project_costingsheet2.jsp in Portlet B.&lt;br&gt;2. When you directly access Portlet B, project_list.jsp should be displayed.&lt;br&gt;&lt;br&gt;&lt;br&gt;for&lt;strong&gt; project_list.jsp&lt;/strong&gt; the&lt;strong&gt;&lt;strong&gt;&lt;/strong&gt; struts.xml &lt;/strong&gt;file have&lt;br&gt;	&lt;pre&gt;&lt;code&gt;&amp;lt;action path="/portlet_action/apse-projectmgmt-portlet/viewAction" type="com.bmtap.apse.projectmgmt.action.ProjectMgmtAction"&amp;gt;
			&amp;lt;forward name="continue" path="/jsp/project_list.jsp"&amp;gt;&amp;lt;/forward&amp;gt;			
		&amp;lt;/action&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;br&gt;&lt;br&gt;One week I am running behind this...Can anybody help me how to handle my&lt;em&gt; tiles-defs.xml&lt;/em&gt; file&lt;br&gt;&lt;br&gt;Thanks and Regards&lt;br&gt;Priya&lt;/body&gt;&lt;/html&gt;</summary>
    <dc:creator>Priya Pratheep</dc:creator>
    <dc:date>2013-04-01T03:34:19Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to call the struts action (in ext) from a plugin portlet ??</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14422248" />
    <author>
      <name>Chintan Akhani</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14422248</id>
    <updated>2012-06-15T11:20:55Z</updated>
    <published>2012-06-15T11:20:55Z</published>
    <summary type="html">for &amp;#39;post&amp;#39; method below is the alternate approach to call your custom method.&lt;br /&gt;&lt;br /&gt;&amp;lt;portlet:actionURL var=&amp;#34;myURL1&amp;#34; name=&amp;#34;myURL1&amp;#34;&amp;gt;&lt;br /&gt;&amp;lt;portlet:param name=&amp;#34;struts_action&amp;#34; value=&amp;#34;/&amp;#34; /&amp;gt;&lt;br /&gt;&amp;lt;/portlet:actionURL&amp;gt;&lt;br /&gt;&lt;br /&gt; If your method type is &amp;#39;get&amp;#39; than below is the way to create a url.&lt;br /&gt;&lt;br /&gt;&amp;lt;portlet:renderURL var=&amp;#34;myURL2&amp;#34;&amp;gt;&lt;br /&gt; &amp;lt;portlet:param name=&amp;#34;struts_action&amp;#34; value=&amp;#34;/blogs/edit_entry&amp;#34; /&amp;gt;&lt;br /&gt;&amp;lt;/portlet:renderURL&amp;gt;</summary>
    <dc:creator>Chintan Akhani</dc:creator>
    <dc:date>2012-06-15T11:20:55Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to call the struts action (in ext) from a plugin portlet ??</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14422338" />
    <author>
      <name>ruchi sharma</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14422338</id>
    <updated>2012-06-15T10:28:04Z</updated>
    <published>2012-06-15T10:28:04Z</published>
    <summary type="html">Hello friends,&lt;br /&gt;Its working now.... &lt;br /&gt;Their was problem in &amp;#34;PortletUrl&amp;#34;&lt;br /&gt;Now my portlet Url is like this :&lt;br /&gt;PortletURL redirectURL = PortletURLFactoryUtil.create(request, PortletKeys.WIKI, themeDisplay.getPlid(), ActionRequest.ACTION_PHASE);&lt;br /&gt;redirectURL.setWindowState(WindowState.NORMAL);&lt;br /&gt;redirectURL.setParameter(&amp;#34;my_param_01&amp;#34;, &amp;#34;01&amp;#34;);&lt;br /&gt;and rest all the configuration is similar as Lalit posted.&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Ruchi</summary>
    <dc:creator>ruchi sharma</dc:creator>
    <dc:date>2012-06-15T10:28:04Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to call the struts action (in ext) from a plugin portlet ??</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14377566" />
    <author>
      <name>ruchi sharma</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14377566</id>
    <updated>2012-06-13T08:38:25Z</updated>
    <published>2012-06-13T08:38:25Z</published>
    <summary type="html">Hello Amit,&lt;br /&gt;Thanks for telling me the other way to do it, I&amp;#39;ll go through  the links  try to do , if it matches my required conditions.&lt;br /&gt;And i&amp;#39;ll get back to you.&lt;br /&gt;And as mentined by Lalit in previous post I did the same thing to call the (new) struts action (not overiding the existing one) from my plugin portlet, is it not possible in liferay 6 ?? &lt;br /&gt;&lt;br /&gt;Regards&lt;br /&gt;Ruchi</summary>
    <dc:creator>ruchi sharma</dc:creator>
    <dc:date>2012-06-13T08:38:25Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to call the struts action (in ext) from a portlet ??</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14377504" />
    <author>
      <name>ruchi sharma</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14377504</id>
    <updated>2012-06-13T08:33:19Z</updated>
    <published>2012-06-13T08:33:19Z</published>
    <summary type="html">Hi Lalit,&lt;br /&gt;I did almost the same configuration which you mentioned for struts-config.xml &amp;amp; tiles-defs.xml.&lt;br /&gt;In my case its not taking me to the destination jsp... I am on to the same page.(My action class is not even called).&lt;br /&gt;And ya I want to tell you that I am using Liferay 6.... may be thats why its not working for me... &lt;br /&gt;Is their any other way to do the same for liferay 6 ??&lt;br /&gt;&lt;br /&gt;Thanks&lt;br /&gt;Ruchi</summary>
    <dc:creator>ruchi sharma</dc:creator>
    <dc:date>2012-06-13T08:33:19Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to call the struts action (in ext) from a portlet ??</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14377336" />
    <author>
      <name>ruchi sharma</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14377336</id>
    <updated>2012-06-13T08:22:35Z</updated>
    <published>2012-06-13T08:22:35Z</published>
    <summary type="html">HI Chintan,&lt;br /&gt;It is a plugin portlet.&lt;br /&gt;Thanks&lt;br /&gt;Ruchi</summary>
    <dc:creator>ruchi sharma</dc:creator>
    <dc:date>2012-06-13T08:22:35Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to call the struts action (in ext) from a portlet ??</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14375072" />
    <author>
      <name>Amit Doshi</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14375072</id>
    <updated>2012-06-13T06:47:46Z</updated>
    <published>2012-06-13T06:47:46Z</published>
    <summary type="html">Hi Ruchi,&lt;br /&gt;&lt;br /&gt;My First Question why you prefer EXT , you can do the same thing in the HOOK also.&lt;br /&gt;&lt;br /&gt;And if you try to create the new Struts Action then I prefer you to do in hook or Override the Existing one. Because EXT required to Restart the Server..&lt;br /&gt;&lt;br /&gt;Please check below link, how to use the Struts action in HOOK.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.liferay.com/web/mika.koivisto/blog/-/blogs/7132115"&gt;http://www.liferay.com/community/forums/-/message_boards/message/14288957&lt;/a&gt;&lt;br /&gt;&lt;a href="http://www.liferay.com/web/mika.koivisto/blog/-/blogs/7132115"&gt;http://www.liferay.com/web/mika.koivisto/blog/-/blogs/7132115&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Hope it helps.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Amit Doshi</summary>
    <dc:creator>Amit Doshi</dc:creator>
    <dc:date>2012-06-13T06:47:46Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to call the struts action (in ext) from a portlet ??</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14375376" />
    <author>
      <name>Lalit Jugran</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14375376</id>
    <updated>2012-06-13T06:32:42Z</updated>
    <published>2012-06-13T06:32:42Z</published>
    <summary type="html">Hi Ruchi,&lt;br /&gt;&lt;br /&gt;       If you are talking about struts path in ext environment(like liferay 5.2.3) then following steps may be helpful.&lt;br /&gt;&lt;br /&gt;1- make a PortletURL in the jsp of portlet where you want to use this path.&lt;br /&gt;&lt;br /&gt;        PortletURL submitURL=renderResponse.createActionURL();&lt;br /&gt;	submitURL.setParameter(&amp;#34;struts_action&amp;#34;,&amp;#34;/ext/abc/manage_account/manage&amp;#34;);&lt;br /&gt;	submitURL.setWindowState(WindowState.NORMAL);&lt;br /&gt;	&lt;br /&gt;2- Make following entry in the struts-config.xml&lt;br /&gt;     &lt;br /&gt;     &amp;lt;action path=&amp;#34;/ext/abc/manage_account/manage&amp;#34;      type=&amp;#34;com.abc.portlet.manage_account.action.ManageAccountAction&amp;#34; &amp;gt;&lt;br /&gt;               &amp;lt;forward name=&amp;#34;portlet.ext.abc.manage_account.view&amp;#34; path=&amp;#34;portlet.ext.abc.manage_account.view&amp;#34; /&amp;gt;&lt;br /&gt;     &amp;lt;/action&amp;gt;&lt;br /&gt;&lt;br /&gt;3- Make following entry in tiles-defs.xml&lt;br /&gt;      &amp;lt;definition name=&amp;#34;portlet.ext.abc.manage_account.view&amp;#34; extends=&amp;#34;portlet&amp;#34;&amp;gt;&lt;br /&gt;		&amp;lt;put name=&amp;#34;portlet_content&amp;#34; value=&amp;#34;/portlet/manage/view2.jsp&amp;#34; /&amp;gt;&lt;br /&gt;	&amp;lt;/definition&amp;gt;&lt;br /&gt;&lt;br /&gt;       view2.jsp is the destination jsp, where you will navigate after following this struts path. In liferay 6 there is no scope of extending these files struts-config.xml or tiles-defs.xml&lt;br /&gt;&lt;br /&gt;Hope this will help...</summary>
    <dc:creator>Lalit Jugran</dc:creator>
    <dc:date>2012-06-13T06:32:42Z</dc:date>
  </entry>
  <entry>
    <title>RE: How to call the struts action (in ext) from a portlet ??</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14373246" />
    <author>
      <name>Chintan Akhani</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14373246</id>
    <updated>2012-06-13T06:13:47Z</updated>
    <published>2012-06-13T06:13:47Z</published>
    <summary type="html">From which portlet you are calling struts action, whether it is a plugin portlet or ext?</summary>
    <dc:creator>Chintan Akhani</dc:creator>
    <dc:date>2012-06-13T06:13:47Z</dc:date>
  </entry>
  <entry>
    <title>How to call the struts action (in ext) from a portlet ??</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14365664" />
    <author>
      <name>ruchi sharma</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=14365664</id>
    <updated>2012-06-12T15:45:48Z</updated>
    <published>2012-06-12T15:45:48Z</published>
    <summary type="html">Hi,&lt;br /&gt;I am trying to call the new struts action defined in ext (struts-config-ext.xml, tiles-defs-ext.xml) from a portlet.&lt;br /&gt;But, unfortunately its not working for me, can anybody tell me with an example how to achieve this.&lt;br /&gt;Thanks&lt;br /&gt;Ruchi</summary>
    <dc:creator>ruchi sharma</dc:creator>
    <dc:date>2012-06-12T15:45:48Z</dc:date>
  </entry>
</feed>
