struts2 中redirectAction如何传递参数!

如果这个action后面要带参数,比如xxxAction?id=xxxx
也可以搞定,用下面的方法:

Xml代码
<action name="updateCampaign" class="campaignAction" method="updateCampaign">  
    <result name="success" type="redirectAction">  
        viewCampaignDetail?campaignId=${campaignId}   
    </result>  
</action>  


或者
Xml代码



<action name="updateCampaign" class="campaignAction" method="updateCampaign">
	<result name="success" type="redirectAction">
		<param name="actionName">viewCampaignDetail</param>
		<param name="campaignId">${campaignId}</param>
	</result>
</action>

你可能感兴趣的:(java,xml)