Question: how to pass data from view to controller in spring mvc?
Answer: public class User{ private String userName; private String password; //getters and setters. }