没有合适的资源?快使用搜索试试~ 我知道了~
如何使用servlet和commons-fileupload-1.2.1.jar和commons-io-2.4.jar
需积分: 10 3 下载量 117 浏览量
2014-12-03
00:37:37
上传
评论
收藏 6KB TXT 举报
温馨提示
试读
6页
如何使用servlet和commons-fileupload-1.2.1.jar和commons-io-2.4.jar两个jar
资源推荐
资源详情
资源评论
01.<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
02.
03.<%@include file="/common/tag.jsp"%>
04.<%@include file="/common/jquery.jsp"%>
05.
06.
07.<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
08.<html>
09.<head>
10.
11.<title>My JSP 'index.jsp' starting page</title>
12.<meta http-equiv="pragma" content="no-cache">
13.<meta http-equiv="cache-control" content="no-cache">
14.<meta http-equiv="expires" content="0">
15.<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
16.<meta http-equiv="description" content="This is my page">
17.<!--
18. <link rel="stylesheet" type="text/css" href="styles.css">
19. -->
20.<script type="text/javascript">
21.
22. function checkUpload(){
23.
24. var $upFile = $("#upfile");
25.
26. if($upFile.val()==""){
27. return false;
28. }
29.
30. return true;
02.
03.<%@include file="/common/tag.jsp"%>
04.<%@include file="/common/jquery.jsp"%>
05.
06.
07.<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
08.<html>
09.<head>
10.
11.<title>My JSP 'index.jsp' starting page</title>
12.<meta http-equiv="pragma" content="no-cache">
13.<meta http-equiv="cache-control" content="no-cache">
14.<meta http-equiv="expires" content="0">
15.<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
16.<meta http-equiv="description" content="This is my page">
17.<!--
18. <link rel="stylesheet" type="text/css" href="styles.css">
19. -->
20.<script type="text/javascript">
21.
22. function checkUpload(){
23.
24. var $upFile = $("#upfile");
25.
26. if($upFile.val()==""){
27. return false;
28. }
29.
30. return true;
31. }
32.
33.</script>
34.
35.</head>
36.
37.<body>
38.
39. <form action="${pageContext.request.contextPath}/uploadFile.do"
40. method="post" enctype="multipart/form-data" onsubmit="return checkUpload()">
41. <table>
42. <tr>
43. <td colspan="2">${requestScope.msg}</td>
44. </tr>
45. <tr>
46. <td><fmt:message key="uploadUser" /></td>
47. <td><input type="text" name="user" /></td>
48. </tr>
49. <tr>
50. <td><fmt:message key="uploadfile" /></td>
51. <td><input type="file" name="upload" id="upfile" /></td>
52. </tr>
53. <tr>
54. <td colspan="2"><input type="submit"
55. value='<fmt:message key="submitUpload"></fmt:message>' /></td>
56. </tr>
57. </table>
58.
59.
60. </form>
32.
33.</script>
34.
35.</head>
36.
37.<body>
38.
39. <form action="${pageContext.request.contextPath}/uploadFile.do"
40. method="post" enctype="multipart/form-data" onsubmit="return checkUpload()">
41. <table>
42. <tr>
43. <td colspan="2">${requestScope.msg}</td>
44. </tr>
45. <tr>
46. <td><fmt:message key="uploadUser" /></td>
47. <td><input type="text" name="user" /></td>
48. </tr>
49. <tr>
50. <td><fmt:message key="uploadfile" /></td>
51. <td><input type="file" name="upload" id="upfile" /></td>
52. </tr>
53. <tr>
54. <td colspan="2"><input type="submit"
55. value='<fmt:message key="submitUpload"></fmt:message>' /></td>
56. </tr>
57. </table>
58.
59.
60. </form>
剩余5页未读,继续阅读
资源评论
qq_22944945
- 粉丝: 0
- 资源: 1
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功