Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/xpath/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Struts2 长变量的set方法(setMobile())在struts 2框架的action类运行时出错_Struts2 - Fatal编程技术网

Struts2 长变量的set方法(setMobile())在struts 2框架的action类运行时出错

Struts2 长变量的set方法(setMobile())在struts 2框架的action类运行时出错,struts2,Struts2,在上述代码中,setMobileLong mobile方法给出以下例外情况: java.lang.NoSuchMethodException:com.kumar.student.StudentAction.setMobile[Ljava.lang.String 发布完整的stacktrace。你忘了问问题。你提交的值是多少?我提交的手机号码由10位数字组成,如9052599254 package com.kumar.student; import java.util.List; import

在上述代码中,setMobileLong mobile方法给出以下例外情况:

java.lang.NoSuchMethodException:com.kumar.student.StudentAction.setMobile[Ljava.lang.String


发布完整的stacktrace。你忘了问问题。你提交的值是多少?我提交的手机号码由10位数字组成,如9052599254
package com.kumar.student;

import java.util.List;

import com.opensymphony.xwork2.ActionSupport;

public class StudentAction extends ActionSupport {

    private static final long serialVersionUID = 1L;
    private String name;
    private String rollNumber;
    private String department;
    private String year;
    private String dob;
    private String email;
    private long mobile;
    private List<String> gender;

    @Override
    public String execute() {

        return "success";

    }

    // all setter & getter method for remaining variable

        public long getMobile() {
        return mobile;
    }

    public void setMobile(long mobile) {
        this.mobile = mobile;
    }

    public List<String> getGender() {
        return gender;
    }

    public void setGender(List<String> gender) {
        this.gender = gender;
    }

}