This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread 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 Murach's Java Servlets and JSP this week in the Servlets 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: 17249

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
jQuery in Action, 2nd edition
subject: How can I get a normal input tag's value?
Similar Threads
Spring MVC Request Mapping
TOMCAT 7 - Jboss 5.1.0.GA - Spring - JSP - I need some guidance.
retreiving values from database,in spring mvc simple form controller
problem while loading the welcome page
Validation error: Failed to convert property value of type [java.lang.String] to required type [int]