File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Spring and the fly likes How can I get a normal input tag's value? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "How can I get a normal input tag Watch "How can I get a normal input tag New topic

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

wu qing

Joined: Sep 05, 2009
Posts: 1
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

Joined: Feb 05, 2001
Posts: 17276

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()


Perfect World Programming, LLC - iOS Apps
How to Ask Questions the Smart Way FAQ
Hong Anderson
Ranch Hand

Joined: Jul 05, 2005
Posts: 1936
As I know there is no way.

And password is not the same as retype password.

SCJA 1.0, SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCJP 5.0, SCEA 5, SCBCD 5; OCUP - Fundamental, Intermediate and Advanced; IBM Certified Solution Designer - OOAD, vUML 2; SpringSource Certified Spring Professional
Don't get me started about those stupid light bulbs.
subject: How can I get a normal input tag's value?
It's not a secret anymore!