Hi friends
I am using Lifray portlet and struts. I am redirection from one portlet to
another portlet
Below is my code
>From Portlet
<liferay-portlet:actionURL var="linkURL" name="prepareObjects"
portletName="apseprojectmgmtportlet_WAR_apseprojectmgmtportlet"
windowState="maximized" >
<portlet:param name="struts_action"
value="/apse-projectmgmt-portlet/projectCostingSheetAction2.do" />
<portlet:param name="procode" value="8055T215" />
<portlet:param name="csid" value="101" />
</liferay-portlet:actionURL>">
<a href="<%= linkURL%>">link to document library
In Portlet 2,I am using struts
My code is
In struts-config.xml file
<action path="/portlet_action/apse-projectmgmt-portlet/viewAction"
type="com.bmtap.apse.projectmgmt.action.ProjectMgmtAction">
<forward name="continue" path="/jsp/project_list.jsp"></forward>
</action>
<action attribute="projectCostingSheetForm2" name="DynaFormBean"
path="/apse-projectmgmt-portlet/projectCostingSheetAction2"
type="com.bmtap.apse.projectmgmt.action.ProjectMgmtAction">
<forward name="continue"
path="/jsp/project_costingsheet2.jsp"></forward>
</action>
My portlet.xml file
<portlet-class>com.bmtap.apse.projectmgmt.portlet.ProjectMgmtPortlet</portlet-class>
<init-param>
<name>ServletContextProvider</name>
<value>com.liferay.util.bridges.struts.LiferayServletContextProviderWrapper</value>
</init-param>
<init-param>
<name>ViewPage</name>
<value>/apse-projectmgmt-portlet/portlet_action/apse-projectmgmt-portlet/viewAction</value>
</init-param>
Once I click link to document library in portlet 1 My page is redirected to
project_list.jsp . But I want to redirect to project_costingsheet2.jsp with
form variables procode, csid.
One more question how can assign form variable?
receiving variable through
public void processAction(ActionRequest req, ActionResponse
res,ActionMapping mapping) throws PortletException, IOException
{
String procode=req.getParameter("procode");
String csid=req.getParameter("csid");
I can receive variable procode and csid and how make them to my form
parameters ..
My Action class
public class ProjectMgmtAction extends Action{
@Override
public ActionForward execute(ActionMapping mapping, ActionForm
form,HttpServletRequest request, HttpServletResponse response) throws
Exception{
...
DynaActionForm actionform=(DynaActionForm)form;
String procode = (String)actionform.get("procode");
request.setAttribute("procode", procode);
I am new to struts and Lifray . Please help me sort out this
Thanks in advance
Priya
--
View this message in context:
http://struts.1045723.n5.nabble.com/How-to-redirect-tp5712300.html
Sent from the Struts - Dev mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]