jsp的文件怎么上传
1.文件上传:
有关jsp的文件上传,我们需要导一个叫jspsmartupload.jar的包。
例 1.1.1
upload.jsp:
<%@ page contentType="text/html; charset=GBK" %>
<html>
<body>
<h1>
<%
if(request.getParameter("i")!=null)
{
out.print("上传了"+request.getParameter("i")+"个文件");
}
%>
</h1>
we must use post, otheriwse, report negativeArray error.
<form method="post" action="ServletHello2" enctype="multipart/form-data">
<br>
<input type="text" name="user" value="可以中文"/>
<!--the following name does not matter.-->
<input type="file" name="upload"/>
<input type="file" name="upload1"/>
<br>
<input type="submit" name="Submit" value="Submit">
<input type="reset" value="Reset">
</form>
</body>
</htm>
更多内容请见原文,文章转载自:https://blog.csdn.net/qq_44638460/article/details/104157814