先看一下Servlet是如何处理文件上传的:Servlets - File UploadingJava File Upload Example with Servlet 3.0 API Spring MVC下的处理是类似的。下面展示一个简单的实现。 项目结构与源码 web.xml<?xml version="1.0" encoding="UTF-8"?><web-app version="3.1" xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.
Jar files are intended to hold generic libraries of Java classes, resources, etc.War files are intended to contain complete Web applications.Ear files are intended to contain complete enterprise applications.