<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
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>My JSP 'uploadFile.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>
注册用户: <br>
<form action="upload/doupLoadFile.jsp" method="post" enctype="multipart/form-data">
用户名:<input type="text" name="userName"/><br/>
密码:<input type="password" name="userPwd"/><br/>
头像:<input type="file" name="picFile"/><br/>
<input type="submit" value="注册"/>
</form>
</body>
</html>
JSP实现文件上传——uploadFile.jsp
原创
©著作权归作者所有:来自51CTO博客作者穆雄雄的博客的原创作品,请联系作者获取转载授权,否则将追究法律责任
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
JSP smartupload 文件上传
文件上传篇 ㈠ 表单要求 对于上传文件的FORM表单,有两个要求:1、METHOD应用POST,即METHOD="POST"。 2、增
jsp input file html 扩展 -
jsp文件断点上传
之前仿造uploadify写了一个HTML5版的文件上传插件,没看过的朋友可以点此先看一下~得到了不少朋友的好评,我自己也用在了项目中,不论是用户头像上传,还是各种媒体文件的上传,以及各种个性的业务需求,都能得到满足。小小开心了一把。 但无论插件再怎么灵活,也难以应付所有的需求,比如,你要上传一个2
超大文件上传方案(网页) 超大文件上传方案(B/S) B/S选择文件夹上传 web选择文件夹上传 jsp选择文件夹上传 -
上传文件的jsp文件代码,uploadfile.jsp
正在学习struts这个框架,目前正在利用这个框架开发一个小型的Blog Web,其中涉
JSP Struts Apache Servlet Myeclipse