日期:2014-05-17  浏览次数:20585 次

struts2 type="redirect"
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE struts PUBLIC
  "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"
  "http://struts.apache.org/dtds/struts-2.0.dtd">
<struts>
<constant name="struts.devMode" value="true" />
<constant name="struts.enable.DynamicMethodInvocation" value="true" />
<constant name="struts.custom.i18n.resources" value="message"></constant>
<constant name="struts.multipart.maxSize" value="1000000000" />
<package name="default" extends="struts-default">
<action name="work*" class="WorkAction"
method="{1}">
<result name="success">/itassets/work/work_list.jsp</result>
<result name="display">/itassets/work_info.jsp</result>
<result name="tocreate">/itassets/work_create.jsp</result>
<result name="toupdate">/itassets/work_update.jsp</result>
<result name="error">/common/error.jsp</result>
<result name="tolist" type="redirect">
worklist.do?server=${server}
</result> </action>
</package>
</struts>
为什么worklist.do?server=${server}无法传值呢


------解决方案--------------------
Action中server是否有getter和setter 方法并且在方法中调用了setter方法赋值
------解决方案--------------------
action中server属性必须有get/set方法