liferay在sturs2中传参数

jsp 页面代码


<portlet:renderURL var="showSummartTraffic" windowState="<%=LiferayWindowState.EXCLUSIVE.toString()  %>">  
				    <portlet:param name="struts.portlet.action" value="/summaryTrafficReport/showSummartTraffic" />  
				    <portlet:param name="testParam" value="testValue" />  
				 </portlet:renderURL>  


struts2中代码


String testParam =  ServletActionContext.getRequest().getParameter("testParam");
	 System.out.println("testParam = " + testParam);


输出结果 


testParam = testValue

你可能感兴趣的:(liferay在sturs2中传参数)