Possible Duplicate:
Spring MultipartFile validation and conversion
I need to check whether file has been provided by user from jsp page.
The codes are as follows.
When I run in debug mode the file(MultiPartFile) is not null, though the file was not provided.
I want to use annotation based validation for everything.
Any help would be appreciated.
<form:form modelAttribute="timeStampIssueParam"
action="${pageContext['request'].contextPath}/timestamp/issue"
method="post" enctype="multipart/form-data">
<fieldset>
<p>
<form:label for="file" path="file">PDF Original</form:label>
<br />
<form:input path="file" type="file"/>
</p>
<p>
@NotNull
private List<MultipartFile> file
public void issue(HttpServletResponse response, @Valid TimeStampIssueParam tsIssueParam, BindingResult result) throws JsonGenerationException, JsonMappingException, IOException {