Struts2 下传多个文件

Struts2 上传多个文件

Struts2  下传多个文件

<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/WEB-INF/struts-tags.tld"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<script language="javascript">
function addComponent()
{
var uploadHTML=document.createElement("<input type='file'  name='upload' />");
document.getElementById("files").appendChild(uploadHTML);
uploadHTML=document.createElement("<p />");
document.getElementById("files").appendChild(uploadHTML);
}
</script>
</head>
<body>
<input type="button" onclick=addComponent(); value="添加文件" />
<br />
<form onsubmit="returntrue;" action="/struts2/test/upload.action" method="post" enctype="multipart/form-data">
<span id="files"> <input type='file' name='upload' />
<p />
</span> <input type="submit" value="上传" />
</form>
</body>
</html>