File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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
Author

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

wu qing
Greenhorn

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
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

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


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