struts 2.3.15.1 获取不到前台的值
之前的项目是2.1.6的,今天客户要求要升级升到了2.3.15.1,项目运行正常。但在一些方法获取不到前台的值。以下是我的配置文件web.xml<filter><filt...
之前的项目是2.1.6的,今天客户要求要升级升到了2.3.15.1,项目运行正常。但在一些方法获取不到前台的值。以下是我的配置文件
web.xml
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>
struts
<constant name="struts.custom.i18n.resources" value="message" />
<constant name="struts.action.extension" value="action,do" />
<constant name="struts.devMode" value="false" />
<constant name="struts.enable.DynamicMethodInvocation" value="false" />
<constant name="struts.objectFactory" value="spring" />
<constant name="struts.objectFactory.spring.autoWire" value="type" />
<constant name="struts.objectFactory.spring.autoWire.alwaysRespect" value="true" />
<action name="detailTOrderPaymentLog" class="com.action.TOrderPaymentLogDetailAction">
<result name="success" type="jsonResult">
<param name="includeProperties">
result
</param>
</result>
<interceptor-ref name="jsonValidationStack"/>
</action>
action里的代码
private String tOrderPaymentLogId;
protected String doAction() throws Exception {
setResult(this.tPaymentInfoService
.detailTOrderPaymentLog(tOrderPaymentLogId));
return SUCCESS;
}
tOrderPaymentLogId有get和set方法,在没升级前使用是正常的,升级后除了取不到值也都是正常的。 展开
web.xml
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>*.action</url-pattern>
</filter-mapping>
struts
<constant name="struts.custom.i18n.resources" value="message" />
<constant name="struts.action.extension" value="action,do" />
<constant name="struts.devMode" value="false" />
<constant name="struts.enable.DynamicMethodInvocation" value="false" />
<constant name="struts.objectFactory" value="spring" />
<constant name="struts.objectFactory.spring.autoWire" value="type" />
<constant name="struts.objectFactory.spring.autoWire.alwaysRespect" value="true" />
<action name="detailTOrderPaymentLog" class="com.action.TOrderPaymentLogDetailAction">
<result name="success" type="jsonResult">
<param name="includeProperties">
result
</param>
</result>
<interceptor-ref name="jsonValidationStack"/>
</action>
action里的代码
private String tOrderPaymentLogId;
protected String doAction() throws Exception {
setResult(this.tPaymentInfoService
.detailTOrderPaymentLog(tOrderPaymentLogId));
return SUCCESS;
}
tOrderPaymentLogId有get和set方法,在没升级前使用是正常的,升级后除了取不到值也都是正常的。 展开
1个回答
2014-06-10
展开全部
tant name="struts.custom.i18n.resources" value="message" />
<constant name="struts.action.extension" value="action,do" />
<constant name="struts.devMode" value="false" />
<constant name="struts.enable.DynamicMethodInvocation" value="false" />
<constant name="struts.objectFactory" value="spring" />
<constant name="struts.objectFactory.spring.autoWire" value="type" />
<constant name="struts.objectFactory.spring.autoWire.alwaysRespect" value="true" />
<action name="detailTOrderPaymentLog" class="com.action.TOrderPaymentLogDetailAction">
<result name="success" type="jsonResult">
<param name="includeProperties">
result
</param>
</result>
<constant name="struts.action.extension" value="action,do" />
<constant name="struts.devMode" value="false" />
<constant name="struts.enable.DynamicMethodInvocation" value="false" />
<constant name="struts.objectFactory" value="spring" />
<constant name="struts.objectFactory.spring.autoWire" value="type" />
<constant name="struts.objectFactory.spring.autoWire.alwaysRespect" value="true" />
<action name="detailTOrderPaymentLog" class="com.action.TOrderPaymentLogDetailAction">
<result name="success" type="jsonResult">
<param name="includeProperties">
result
</param>
</result>
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询