jsp頁面
<%
<html:form action=
附件
<input type=
</ul>
</html:form>
ActionForm:
private FormFile file;
Action
import mons
import mons
import mons
import java
import java
import org
import java
import java
import java
//附件
FormFile file = (FormFile) replyForm
if (file != null && file
String fileName = file
byte[] b = file
String dir = request
OutputStream streamOut = new FileOutputStream(dir +
fileName);
streamOut
}
From:http://tw.wingwit.com/Article/program/Java/hx/201311/25575.html