Hey guys!
I'm trying to make an Annotation based upload controller... but with no success.
Spring is no finding the param with the file.
This is my upload method on my controller:org.springframework.web.bind.MissingServletRequest ParameterException: Required org.springframework.web.multipart.MultipartFile parameter 'file' is not present
And my Upload form:Code:@RequestMapping("/painel.upload.do") public String upload(@RequestParam("file") MultipartFile file) { if (file == null) { System.out.println("OH NO"); } else { System.out.println("Yes!"); } return "painel.lista"; }
Is there soething missing?HTML Code:<form method="POST" enctype="multipart/form-data" action="painel.upload.do"> <fieldset> <legend>Upload Painel</legend> <table> <tr> <td> <label>Arquivo:</label> </td> <td> <input type="file" name="file" /> </td> </tr> <tr> <td colspan="2"> <input type="submit" /> </td> </tr> </table> </fieldset> </form>
Thanks guys


.
Reply With Quote
