日期:2014-05-17 浏览次数:21136 次
<%@ page language="java" pageEncoding="GBK"%>
<%
String path = request.getContextPath();
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>文件上传</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">
</head>
<body>
<form action="UploadSuccess.jsp" method="post" enctype="multipart/form-data">
请选择要上传的文件:<br>
<input type="file" name="upfile"><br>
备注:<input type="text" name="description">
<input type="submit" value="上传" name="upload"><br>
</form>
</body>
</html>
------解决方案--------------------
不用包的话用输入输出流做吧?
------解决方案--------------------
Structs已经封装了文件上传类,可以网上找点资源研究下
------解决方案--------------------
smartupload,很简单很好很强大
------解决方案--------------------
common-fileupload,这个不错啊