This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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

Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
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: 17250

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 - Two Laptop Bag - Tube Organizer
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?