Struts2 passing variables case

后端 未结 3 1617
Happy的楠姐
Happy的楠姐 2020-11-29 12:55

I\'m using Datatables server side ajax pagination and need to pass some variables to server. My server is running Struts2 actions to handle this datatables requests.

3条回答
  •  爱一瞬间的悲伤
    2020-11-29 13:18

    If the variable is

    private String xTrace;
    

    getters and setters should be

    public String getXTrace() {
        return xTrace;
    }
    
    public void setXTrace(String xTrace) {
        this.xTrace = xTrace;
    }
    

    regardless of the double consecutive uppercase characters. The rule is that the first character after the set / get part is uppercased, the rest is unchanged

提交回复
热议问题