-
Aug 3rd, 2012, 03:07 AM
#1
how to get a values from a multipart/form-data
Multipart only getting the File upload value not for name, password. how can i get the both(file, name) value in the form..
-
Aug 7th, 2012, 07:29 AM
#2
Your Form or Command Object needs to define the properties which spring will bind when request is received by the controller.
Example:
<code>
public class MyFormObject{
private MultipartFile file;
private String username;
private transient password;
//getter and setters here
}
</code>
Then in the view ( ie. jsp for example) have the input fields that map to MyFormObject properties which spring will bind for you.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules