w(document.getElementById("row" + line).rowIndex);
}
</script>
</head>
<body>
<form name="updForm" method="post" action="upload.do" enctype="multipart/form-data">
<table id="oTable">
<tr>
<td>name:</td>
<td><input name="name" type="text"></td>
</tr>
<tr>
<td>上传图片:</td>
<td><input type=file name="temp"> <input type="button" name="add" value="多图片上传 " onClick="addRow()"></td>
</tr>
<tr>
<td><input name="sub" type="submit" value=" 上传 "></td>
</tr>
</table>
</form>
</body>
</html>
struts实现多图片上传(3)
时间:2010-12-26 BlogJava
next.jsp
<%@ page language="java" import="java.util.*" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%
String path = request.getContextPath() + "/upload";
String basePath = request.getScheme() + "://"
+ request.getServerName() + ":" + request.getServerPort()
+ path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>My JSP ''next.jsp'' starting page</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
<link rel="stylesheet" type="text/css" href="styles.css">
-->
</head>
<body>
<c:forEach var="fileName" items="${fileNames}" begin=''1''>
<img alt="" width="300" height="200" src="<%=basePath%>${fileName}">
</c:forEach>
</body>
</html>
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd">
<struts-config>
<data-sources />
<form-beans >
<form-bean nam
|