Struts2传值的问题
我常用下面的方式传值到Action中:
function toAction(val){window.location="Action?field="+val;}
<a href="javascript:toAction(1)">ToAction</a>
<a href="Action!method()">ToAction</a>
function toAction(){window.location="Action?field=1!method()";}
<package name="default" namespace="/" extends="struts-default"> <action name="*_*" class="com.csu.hongkiton.oa.action.{1}" method="{2}"> <exception-mapping result="exception" exception="java.lang.Exception"></exception-mapping> <result>${forward }</result> <result name="exception">/common/exception.jsp</result> </action> </package>