{"id":7539,"date":"2013-01-24T19:00:58","date_gmt":"2013-01-24T17:00:58","guid":{"rendered":"http:\/\/www.javacodegeeks.com\/?p=7539"},"modified":"2013-01-24T14:26:24","modified_gmt":"2013-01-24T12:26:24","slug":"spring-mvc-3-upload-multiple-files","status":"publish","type":"post","link":"https:\/\/www.javacodegeeks.com\/2013\/01\/spring-mvc-3-upload-multiple-files.html","title":{"rendered":"Spring MVC 3: Upload multiple files"},"content":{"rendered":"<p>It was just another long day at office with the database not available and one of the team members lagging by a week now. So, we had to work as a team to get it delivered. In Spring 3, it looked straight forward to upload a file. However, there was little help on offer, to upload multiple files from a jsp file.<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\nThere are three basic things which need to be done to upload multiple files are:<\/p>\n<p>a) The JSP needs to have the input[file] elements passed as an array.<\/p>\n<pre class=\"brush:xml\">&lt;td&gt;&lt;input name=\"fileData[0]\" id=\"image0\" type=\"file\" \/&gt;&lt;\/td&gt;\r\n&lt;td&gt;&lt;input name=\"fileData[1]\" id=\"image1\" type=\"file\" \/&gt;&lt;\/td&gt;<\/pre>\n<p>b) The ModelAttribute\/Model object in Spring MVC needs to have a list of MultipartFile.<\/p>\n<pre class=\"brush:java\">import java.util.List;\r\nimport org.springframework.web.multipart.commons.CommonsMultipartFile;\r\npublic class UploadItem {\r\n     private String filename;\r\n     private List&lt;CommonsMultipartFile&gt; fileData;<\/pre>\n<p>c) Configure Multipart Resolver bean in dispatcher-servlet.xml[applicationContext-servlet.xml]<\/p>\n<pre class=\"brush:xml\">&lt;!-- Configure the multipart resolver --&gt;\r\n&lt;bean id=\"multipartResolver\" class=\"org.springframework.web.multipart.commons.CommonsMultipartResolver\"&gt;\r\n&lt;\/bean&gt;<\/pre>\n<p>d) Logic to read the files from the Model and store it in a file location in the Controller layer.<\/p>\n<pre class=\"brush:java\">@RequestMapping(method = RequestMethod.POST)\r\npublic String create(UploadItem uploadItem, BindingResult result,\r\nHttpServletRequest request, HttpServletResponse response,\r\nHttpSession session) {\r\nif (result.hasErrors()) {\r\nfor (ObjectError error : result.getAllErrors()) {\r\nSystem.err.println(\"Error: \" + error.getCode() + \" - \"\r\n+ error.getDefaultMessage());\r\n}\r\nreturn \"\/uploadfile\";\r\n}\r\n\/\/ Some type of file processing...\r\nSystem.err.println(\"-------------------------------------------\");\r\ntry {\r\nfor(MultipartFile file:uploadItem.getFileData()){\r\nString fileName = null;\r\nInputStream inputStream = null;\r\nOutputStream outputStream = null;\r\nif (file.getSize() &gt; 0) {\r\ninputStream = file.getInputStream();\r\nif (file.getSize() &gt; 20000) {\r\nSystem.out.println(\"File Size exceeded:::\" + file.getSize());\r\nreturn \"\/uploadfile\";\r\n}\r\nSystem.out.println(\"size::\" + file.getSize());\r\nfileName = request.getRealPath(\"\") + \"\/images\/\"\r\n+ file.getOriginalFilename();\r\noutputStream = new FileOutputStream(fileName);\r\nSystem.out.println(\"fileName:\" + file.getOriginalFilename());\r\nint readBytes = 0;\r\nbyte[] buffer = new byte[10000];\r\nwhile ((readBytes = inputStream.read(buffer, 0, 10000)) != -1) {\r\noutputStream.write(buffer, 0, readBytes);\r\n}\r\noutputStream.close();\r\ninputStream.close();\r\n\/\/ ..........................................\r\nsession.setAttribute(\"uploadFile\", file.getOriginalFilename());\r\n}\r\n\/\/MultipartFile file = uploadItem.getFileData();\r\n}\r\n} catch (Exception e) {\r\ne.printStackTrace();\r\n}\r\nreturn \"redirect:\/forms\/uploadfileindex\";\r\n}<\/pre>\n<p>I have extended the example which is found @ <a href=\"http:\/\/www.roseindia.net\/tutorial\/spring\/spring3\/web\/spring-3-mvc-fileupload-example.html\">RoseIndia<\/a>\u00a0to dynamically create the file nodes and post them to the Controller.<div style=\"display:inline-block; margin: 15px 0;\"> <div id=\"adngin-JavaCodeGeeks_incontent_video-0\" style=\"display:inline-block;\"><\/div> <\/div><\/p>\n<p>Just download the source-code and replace the below jsp file and make other necessary changes:<\/p>\n<p>Upload.jsp<\/p>\n<pre class=\"brush:java\">&lt;%@page contentType=\"text\/html;charset=UTF-8\"%&gt;\r\n&lt;%@page pageEncoding=\"UTF-8\"%&gt;\r\n&lt;%@ page session=\"false\"%&gt;\r\n&lt;%@ taglib prefix=\"form\" uri=\"http:\/\/www.springframework.org\/tags\/form\"%&gt;\r\n\r\n&lt;html&gt;\r\n&lt;head&gt;\r\n&lt;META http-equiv=\"Content-Type\" content=\"text\/html;charset=UTF-8\"&gt;\r\n&lt;title&gt;Upload Example&lt;\/title&gt;\r\n&lt;script language=\"JavaScript\"&gt;\r\nvar count=0;\r\nfunction add(type) {\r\n\/\/Create an input type dynamically.\r\nvar table = document.getElementById(\"fileUploadTable\");\r\nvar tr = document.createElement(\"tr\");\r\nvar td = document.createElement(\"td\");\r\nvar element = document.createElement(\"input\");\r\n\r\n\/\/Assign different attributes to the element.\r\nelement.setAttribute(\"type\", \"file\");\r\nelement.setAttribute(\"value\", \"\");\r\nelement.setAttribute(\"name\", \"fileData[\"+type+\"]\");\r\n\/\/Append the element in page (in span).\r\ntd.appendChild(element);\r\ntr.appendChild(td);\r\ntable.appendChild(tr);\r\n}\r\nfunction Validate()\r\n{\r\nvar image =document.getElementById(\"image\").value;\r\nif(image!=''){\r\nvar checkimg = image.toLowerCase();\r\nif (!checkimg.match(\/(\\.jpg|\\.png|\\.JPG|\\.PNG|\\.jpeg|\\.JPEG)$\/)){\r\nalert(\"Please enter Image File Extensions .jpg,.png,.jpeg\");\r\ndocument.getElementById(\"image\").focus();\r\nreturn false;\r\n}\r\n}\r\nreturn true;\r\n}\r\n\r\n&lt;\/script&gt;\r\n&lt;\/head&gt;\r\n&lt;body&gt;\r\n&lt;form:form modelAttribute=\"uploadItem\" name=\"frm\" method=\"post\"\r\nenctype=\"multipart\/form-data\" onSubmit=\"return Validate();\"&gt;\r\n&lt;fieldset&gt;&lt;legend&gt;Upload File&lt;\/legend&gt;\r\n&lt;table &gt;\r\n&lt;tr&gt;\r\n&lt;input type=\"button\" name=\"Add Image\" onclick=\"add(count++)\" value=\"Add Image\"\/&gt;\r\n&lt;\/tr&gt;\r\n&lt;tr&gt;\r\n&lt;table id=\"fileUploadTable\"&gt;\r\n&lt;!--td&gt;&lt;form:label for=\"fileData\" path=\"fileData\"&gt;File&lt;\/form:label&gt;&lt;br \/&gt;\r\n&lt;\/td&gt;\r\n&lt;td&gt;&lt;input name=\"fileData[0]\" id=\"image0\" type=\"file\" \/&gt;&lt;\/td&gt;\r\n&lt;td&gt;&lt;input name=\"fileData[1]\" id=\"image1\" type=\"file\" \/&gt;&lt;\/td--&gt;\r\n&lt;\/table&gt;\r\n&lt;\/tr&gt;\r\n&lt;tr&gt;\r\n&lt;td&gt;&lt;br \/&gt;\r\n&lt;\/td&gt;\r\n&lt;td&gt;&lt;input type=\"submit\" value=\"Upload\" \/&gt;&lt;\/td&gt;\r\n&lt;\/tr&gt;\r\n&lt;\/table&gt;\r\n&lt;\/fieldset&gt;\r\n&lt;\/form:form&gt;\r\n&lt;\/body&gt;\r\n&lt;\/html&gt;<\/pre>\n<p>UploadItem.java, generate getter and setter methods for the private List fileData;, UploadFileController.java and then just copy and paste the create(\u2026) mentioned in the blog above.<\/p>\n<p>Note: If you are still facing issue with file upload in Spring MVC, please add a MultipartFilter. Refer <a href=\"http:\/\/dev.anyframejava.org\/docs.en\/anyframe\/plugin\/springrest\/1.0.2\/reference\/html\/ch08.html\">here<\/a>.<\/p>\n<pre class=\"brush:xml\">&lt;filter&gt;\r\n&lt;filter-name&gt;multipartFilter&lt;\/filter-name&gt;\r\n&lt;filter-class&gt;org.springframework.web.multipart.support.MultipartFilter&lt;\/filter-class&gt;\r\n&lt;\/filter&gt;\r\n&lt;filter-mapping&gt;\r\n&lt;filter-name&gt;multipartFilter&lt;\/filter-name&gt;\r\n&lt;url-pattern&gt;\/springrest\/*&lt;\/url-pattern&gt;\r\n&lt;\/filter-mapping&gt;<\/pre>\n<pre class=\"brush:xml\">&lt;bean id=\"filterMultipartResolver\" class=\"org.springframework.web.multipart.commons.CommonsMultipartResolver\"&gt;\r\n&lt;property name=\"maxUploadSize\"&gt;\r\n&lt;value&gt;10000000&lt;\/value&gt;\r\n&lt;\/property&gt;\r\n&lt;\/bean&gt;<\/pre>\n<p>&nbsp;<\/p>\n<p><strong><em>Reference: <\/em><\/strong><a href=\"http:\/\/schoudari.wordpress.com\/2012\/09\/22\/multiple-files-upload-in-spring-mvc-3-2\/\">Upload multiple files in Spring MVC 3<\/a> from our <a href=\"http:\/\/www.javacodegeeks.com\/p\/jcg.html\">JCG partner<\/a> Srinivas Ovn at the <a href=\"http:\/\/schoudari.wordpress.com\/\n\">Bemused<\/a> blog.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>It was just another long day at office with the database not available and one of the team members lagging by a week now. So, we had to work as a team to get it delivered. In Spring 3, it looked straight forward to upload a file. However, there was little help on offer, to &hellip;<\/p>\n","protected":false},"author":347,"featured_media":240,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[30,150],"class_list":["post-7539","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-enterprise-java","tag-spring","tag-spring-mvc"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.5 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Spring MVC 3: Upload multiple files<\/title>\n<meta name=\"description\" content=\"It was just another long day at office with the database not available and one of the team members lagging by a week now. So, we had to work as a team to\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.javacodegeeks.com\/2013\/01\/spring-mvc-3-upload-multiple-files.html\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Spring MVC 3: Upload multiple files\" \/>\n<meta property=\"og:description\" content=\"It was just another long day at office with the database not available and one of the team members lagging by a week now. So, we had to work as a team to\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.javacodegeeks.com\/2013\/01\/spring-mvc-3-upload-multiple-files.html\" \/>\n<meta property=\"og:site_name\" content=\"Java Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/javacodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2013-01-24T17:00:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Srinivas Ovn\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:site\" content=\"@javacodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Srinivas Ovn\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/01\\\/spring-mvc-3-upload-multiple-files.html#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/01\\\/spring-mvc-3-upload-multiple-files.html\"},\"author\":{\"name\":\"Srinivas Ovn\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/c25c651e3c8956ddfbc843c12e50a988\"},\"headline\":\"Spring MVC 3: Upload multiple files\",\"datePublished\":\"2013-01-24T17:00:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/01\\\/spring-mvc-3-upload-multiple-files.html\"},\"wordCount\":249,\"commentCount\":1,\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/01\\\/spring-mvc-3-upload-multiple-files.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"keywords\":[\"Spring\",\"Spring MVC\"],\"articleSection\":[\"Enterprise Java\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/01\\\/spring-mvc-3-upload-multiple-files.html#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/01\\\/spring-mvc-3-upload-multiple-files.html\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/01\\\/spring-mvc-3-upload-multiple-files.html\",\"name\":\"Spring MVC 3: Upload multiple files\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/01\\\/spring-mvc-3-upload-multiple-files.html#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/01\\\/spring-mvc-3-upload-multiple-files.html#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"datePublished\":\"2013-01-24T17:00:58+00:00\",\"description\":\"It was just another long day at office with the database not available and one of the team members lagging by a week now. So, we had to work as a team to\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/01\\\/spring-mvc-3-upload-multiple-files.html#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/01\\\/spring-mvc-3-upload-multiple-files.html\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/01\\\/spring-mvc-3-upload-multiple-files.html#primaryimage\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2012\\\/10\\\/spring-logo.jpg\",\"width\":150,\"height\":150,\"caption\":\"spring-interview-questions-answers\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/2013\\\/01\\\/spring-mvc-3-upload-multiple-files.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Enterprise Java\",\"item\":\"https:\\\/\\\/www.javacodegeeks.com\\\/category\\\/java\\\/enterprise-java\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Spring MVC 3: Upload multiple files\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#website\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"name\":\"Java Code Geeks\",\"description\":\"Java Developers Resource Center\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\"},\"alternateName\":\"JCG\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.javacodegeeks.com\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"contentUrl\":\"https:\\\/\\\/www.javacodegeeks.com\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/javacodegeeks\",\"https:\\\/\\\/x.com\\\/javacodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.javacodegeeks.com\\\/#\\\/schema\\\/person\\\/c25c651e3c8956ddfbc843c12e50a988\",\"name\":\"Srinivas Ovn\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/85f516e7d38bfdb7a01e15bb55838923338df84afe53240b3de22083a64d8367?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/85f516e7d38bfdb7a01e15bb55838923338df84afe53240b3de22083a64d8367?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/85f516e7d38bfdb7a01e15bb55838923338df84afe53240b3de22083a64d8367?s=96&d=mm&r=g\",\"caption\":\"Srinivas Ovn\"},\"description\":\"Srinivas is a Senior Software Engineer in java and all related technologies. He has varied experience working in domains like finance, security and telecom. His hobbies include blogging and exploring new java frameworks\\\/technologies.\",\"sameAs\":[\"http:\\\/\\\/schoudari.wordpress.com\\\/\"],\"url\":\"https:\\\/\\\/www.javacodegeeks.com\\\/author\\\/srinivas-ovn\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Spring MVC 3: Upload multiple files","description":"It was just another long day at office with the database not available and one of the team members lagging by a week now. So, we had to work as a team to","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.javacodegeeks.com\/2013\/01\/spring-mvc-3-upload-multiple-files.html","og_locale":"en_US","og_type":"article","og_title":"Spring MVC 3: Upload multiple files","og_description":"It was just another long day at office with the database not available and one of the team members lagging by a week now. So, we had to work as a team to","og_url":"https:\/\/www.javacodegeeks.com\/2013\/01\/spring-mvc-3-upload-multiple-files.html","og_site_name":"Java Code Geeks","article_publisher":"https:\/\/www.facebook.com\/javacodegeeks","article_published_time":"2013-01-24T17:00:58+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","type":"image\/jpeg"}],"author":"Srinivas Ovn","twitter_card":"summary_large_image","twitter_creator":"@javacodegeeks","twitter_site":"@javacodegeeks","twitter_misc":{"Written by":"Srinivas Ovn","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.javacodegeeks.com\/2013\/01\/spring-mvc-3-upload-multiple-files.html#article","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/01\/spring-mvc-3-upload-multiple-files.html"},"author":{"name":"Srinivas Ovn","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/c25c651e3c8956ddfbc843c12e50a988"},"headline":"Spring MVC 3: Upload multiple files","datePublished":"2013-01-24T17:00:58+00:00","mainEntityOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/01\/spring-mvc-3-upload-multiple-files.html"},"wordCount":249,"commentCount":1,"publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/01\/spring-mvc-3-upload-multiple-files.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","keywords":["Spring","Spring MVC"],"articleSection":["Enterprise Java"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.javacodegeeks.com\/2013\/01\/spring-mvc-3-upload-multiple-files.html#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.javacodegeeks.com\/2013\/01\/spring-mvc-3-upload-multiple-files.html","url":"https:\/\/www.javacodegeeks.com\/2013\/01\/spring-mvc-3-upload-multiple-files.html","name":"Spring MVC 3: Upload multiple files","isPartOf":{"@id":"https:\/\/www.javacodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/01\/spring-mvc-3-upload-multiple-files.html#primaryimage"},"image":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/01\/spring-mvc-3-upload-multiple-files.html#primaryimage"},"thumbnailUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","datePublished":"2013-01-24T17:00:58+00:00","description":"It was just another long day at office with the database not available and one of the team members lagging by a week now. So, we had to work as a team to","breadcrumb":{"@id":"https:\/\/www.javacodegeeks.com\/2013\/01\/spring-mvc-3-upload-multiple-files.html#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.javacodegeeks.com\/2013\/01\/spring-mvc-3-upload-multiple-files.html"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/2013\/01\/spring-mvc-3-upload-multiple-files.html#primaryimage","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2012\/10\/spring-logo.jpg","width":150,"height":150,"caption":"spring-interview-questions-answers"},{"@type":"BreadcrumbList","@id":"https:\/\/www.javacodegeeks.com\/2013\/01\/spring-mvc-3-upload-multiple-files.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.javacodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"Java","item":"https:\/\/www.javacodegeeks.com\/category\/java"},{"@type":"ListItem","position":3,"name":"Enterprise Java","item":"https:\/\/www.javacodegeeks.com\/category\/java\/enterprise-java"},{"@type":"ListItem","position":4,"name":"Spring MVC 3: Upload multiple files"}]},{"@type":"WebSite","@id":"https:\/\/www.javacodegeeks.com\/#website","url":"https:\/\/www.javacodegeeks.com\/","name":"Java Code Geeks","description":"Java Developers Resource Center","publisher":{"@id":"https:\/\/www.javacodegeeks.com\/#organization"},"alternateName":"JCG","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.javacodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.javacodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.javacodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.javacodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/javacodegeeks","https:\/\/x.com\/javacodegeeks"]},{"@type":"Person","@id":"https:\/\/www.javacodegeeks.com\/#\/schema\/person\/c25c651e3c8956ddfbc843c12e50a988","name":"Srinivas Ovn","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/85f516e7d38bfdb7a01e15bb55838923338df84afe53240b3de22083a64d8367?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/85f516e7d38bfdb7a01e15bb55838923338df84afe53240b3de22083a64d8367?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/85f516e7d38bfdb7a01e15bb55838923338df84afe53240b3de22083a64d8367?s=96&d=mm&r=g","caption":"Srinivas Ovn"},"description":"Srinivas is a Senior Software Engineer in java and all related technologies. He has varied experience working in domains like finance, security and telecom. His hobbies include blogging and exploring new java frameworks\/technologies.","sameAs":["http:\/\/schoudari.wordpress.com\/"],"url":"https:\/\/www.javacodegeeks.com\/author\/srinivas-ovn"}]}},"_links":{"self":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/7539","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/users\/347"}],"replies":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/comments?post=7539"}],"version-history":[{"count":0,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/posts\/7539\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media\/240"}],"wp:attachment":[{"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/media?parent=7539"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/categories?post=7539"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.javacodegeeks.com\/wp-json\/wp\/v2\/tags?post=7539"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}