Single-letter camelcase fields not submitted in Struts 2 request

☆樱花仙子☆ 提交于 2019-12-12 02:52:11

问题


I have this very-2 strange mapping issue. All fields names like amount, newCase, status etc. are reaching perfectly to the struts Action but none of the single-letter camelCase fields are reaching the action. All are null.

For e.g.

public String callback() {
        System.out.println("nCase : " + nCase);
        System.out.println("Amount : " + amount);
        System.out.println("fAmount==============" + fAmount);
        System.out.println("fFee==============" + fFee);
        System.out.println("sStatus==============" + sStatus);
        System.out.println("sDetails==============" + sDetails);
        System.out.println("iTypeId==============" + iTypeId);
        ToStringBuilder.reflectionToString(this, ToStringStyle.SHORT_PREFIX_STYLE);
        return SUCCESS;
    }

The above code gives output :

nCase : 0.0
Amount : 2323.0
fAmount==============0.0
fFee==============0.0
sStatus==============null
sDetails==============null
iTypeId==============null

for the following request URL :

http://localhost:8084/callback?fAmount=23.323&fFee=23&amount=2323&nCase=2323.23&sStatus=nitin

I have proper getters & setters (checked many times now)

I have checked the interceptors also, and I'm using the defaultStack for this method/action

来源:https://stackoverflow.com/questions/19335468/single-letter-camelcase-fields-not-submitted-in-struts-2-request

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!