• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How can I get a normal input tag's value?

 
wu qing
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am using the spring MVC to implement the user registration, and I want to use the User object as a modelAttribute, but I don't know how to get the retypedPassword parameter from the form.

the jsp code is like this:


and the controller code is like this:


Can anyone tell me how can I get the parameter ? Thanks!
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wouldn't that be user.getPassword(). At least that is the way it should be. If it doesn't work, then there is something wrong with how you are using the form tags and setting the model attribute. But I don't quite see anything wrong there.

But the way it is all supposed to work, you just call user.getPassword()

Mark
 
Hong Anderson
Ranch Hand
Posts: 1936
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As I know there is no way.

And password is not the same as retype password.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic