struts-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From priyapratheep <>
Subject How to redirect ?
Date Tue, 26 Mar 2013 02:18:25 GMT
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" 
windowState="maximized" >  
        <portlet:param name="struts_action"
value="/apse-projectmgmt-portlet/" />  
        <portlet:param name="procode" value="8055T215" />  
        <portlet:param name="csid" value="101" />  
    <a href=&quot;&lt;%= 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"
            <forward name="continue" path="/jsp/project_list.jsp"></forward> 

<action attribute="projectCostingSheetForm2" name="DynaFormBean"
            <forward name="continue"

My portlet.xml file


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{  
    public ActionForward execute(ActionMapping mapping, ActionForm
form,HttpServletRequest request, HttpServletResponse response) throws
        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

View this message in context:
Sent from the Struts - Dev mailing list archive at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message