前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >jsp的文件怎么上传

jsp的文件怎么上传

作者头像
马克java社区
修改2021-10-11 10:24:53
4.3K0
修改2021-10-11 10:24:53
举报
文章被收录于专栏:java大数据

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

本文系转载,前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文系转载前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档