action,controller通过3种方式来接受页面参数

1. 用request.getParameter();前提是方法中有request

2. 对象 public String add(Predection predection){ 

        这里可以用prediction这个对象来接受页面的参数(前提是页面的参数都是这个对象里的属性)

      }

3. 可以通过私有化页面参数,给他set,get下

    private String text;

    private String name;

  

    再给他set,get方法下 

猜你喜欢

转载自957484162.iteye.com/blog/2415076