esoe
2 years ago
21 changed files with 7 additions and 215 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,10 +0,0 @@ |
|||||||
<!DOCTYPE web-app PUBLIC |
|
||||||
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" |
|
||||||
"http://java.sun.com/dtd/web-app_2_3.dtd" > |
|
||||||
|
|
||||||
<web-app> |
|
||||||
<display-name>exchange-servlet</display-name> |
|
||||||
<welcome-file-list> |
|
||||||
<welcome-file>fileupload.jsp</welcome-file> |
|
||||||
</welcome-file-list> |
|
||||||
</web-app> |
|
@ -1,42 +0,0 @@ |
|||||||
<%@page import="java.util.List"%> |
|
||||||
<%@page import="ru.molokoin.UploadDetail"%> |
|
||||||
<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> |
|
||||||
<!DOCTYPE html> |
|
||||||
<html> |
|
||||||
<head> |
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
|
||||||
<title>exchange-servlet</title> |
|
||||||
|
|
||||||
<link rel="stylesheet" href="resource/css/main.css" /> |
|
||||||
</head> |
|
||||||
<body> |
|
||||||
<div class="panel"> |
|
||||||
<h1>Uploaded Files</h1> |
|
||||||
<table class="bordered_table"> |
|
||||||
<thead> |
|
||||||
<tr align="center"><th>File Name</th><th>File Size</th><th>Action</th></tr> |
|
||||||
</thead> |
|
||||||
<tbody> |
|
||||||
<% List<UploadDetail> uploadDetails = (List<UploadDetail>)request.getAttribute("uploadedFiles"); |
|
||||||
if(uploadDetails != null && uploadDetails.size() > 0) { |
|
||||||
for(int i=0; i<uploadDetails.size(); i++) { |
|
||||||
%> |
|
||||||
<tr> |
|
||||||
<td align="center"><span id="fileName"><%=uploadDetails.get(i).getFileName() %></span></td> |
|
||||||
<td align="center"><span id="fileSize"><%=uploadDetails.get(i).getFileSize() %> KB</span></td> |
|
||||||
<td align="center"><span id="fileDownload"><a id="downloadLink" class="hyperLink" href="<%=request.getContextPath()%>/downloadServlet?fileName=<%=uploadDetails.get(i).getFileName() %>">Download</a></span></td> |
|
||||||
</tr> |
|
||||||
<% } |
|
||||||
} else { %> |
|
||||||
<tr> |
|
||||||
<td colspan="3" align="center"><span id="noFiles">No Files Uploaded.....!</span></td> |
|
||||||
</tr> |
|
||||||
<% } %> |
|
||||||
</tbody> |
|
||||||
</table> |
|
||||||
<div class="margin_top_15px"> |
|
||||||
<a id="fileUpload" class="hyperLink" href="<%=request.getContextPath()%>/fileupload.jsp">Back</a> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</body> |
|
||||||
</html> |
|
@ -1,28 +0,0 @@ |
|||||||
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> |
|
||||||
<!DOCTYPE html> |
|
||||||
<html> |
|
||||||
<head> |
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
|
||||||
<title>exchange-servlet</title> |
|
||||||
|
|
||||||
<link rel="stylesheet" href="resource/css/main.css" /> |
|
||||||
</head> |
|
||||||
<body> |
|
||||||
<div class="panel"> |
|
||||||
<h1>File Upload</h1> |
|
||||||
<h3>Press 'CTRL' Key+Click On File To Select Multiple Files in Open Dialog</h3> |
|
||||||
<form id="fileUploadForm" method="post" action="fileUploadServlet" enctype="multipart/form-data"> |
|
||||||
<div class="form_group"> |
|
||||||
<label>Upload File</label><span id="colon">: </span><input id="fileAttachment" type="file" name="fileUpload" multiple="multiple" /> |
|
||||||
<span id="fileUploadErr">Please Upload A File!</span> |
|
||||||
</div> |
|
||||||
<button id="uploadBtn" type="submit" class="btn btn_primary">Upload</button> |
|
||||||
</form> |
|
||||||
</div> |
|
||||||
|
|
||||||
<!-- List All Uploaded Files --> |
|
||||||
<div class="panel"> |
|
||||||
<a id="allFiles" class="hyperLink" href="<%=request.getContextPath()%>/uploadedFilesServlet">List all uploaded files</a> |
|
||||||
</div> |
|
||||||
</body> |
|
||||||
</html> |
|
@ -1,37 +0,0 @@ |
|||||||
<%@page import="java.util.List"%> |
|
||||||
<%@page import="ru.molokoin.UploadDetail"%> |
|
||||||
<%@page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> |
|
||||||
<!DOCTYPE html> |
|
||||||
<html> |
|
||||||
<head> |
|
||||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
|
||||||
<title>exchange-servlet</title> |
|
||||||
|
|
||||||
<link rel="stylesheet" href="resource/css/main.css" /> |
|
||||||
</head> |
|
||||||
<body> |
|
||||||
<div class="panel"> |
|
||||||
<h1>File Upload Status</h1> |
|
||||||
<table class="bordered_table"> |
|
||||||
<thead> |
|
||||||
<tr align="center"><th>File Name</th><th>File Size</th><th>Upload Status</th><th>Action</th></tr> |
|
||||||
</thead> |
|
||||||
<tbody> |
|
||||||
<% List<UploadDetail> uploadDetails = (List<UploadDetail>)request.getAttribute("uploadedFiles"); |
|
||||||
for(int i=0; i<uploadDetails.size(); i++) { |
|
||||||
%> |
|
||||||
<tr> |
|
||||||
<td align="center"><span id="fileName"><%=uploadDetails.get(i).getFileName() %></span></td> |
|
||||||
<td align="center"><span id="fileSize"><%=uploadDetails.get(i).getFileSize() %> KB</span></td> |
|
||||||
<td align="center"><span id="fileuploadStatus"><%=uploadDetails.get(i).getUploadStatus() %></span></td> |
|
||||||
<td align="center"><span id="fileDownload"><a id="downloadLink" class="hyperLink" href="<%=request.getContextPath()%>/downloadServlet?fileName=<%=uploadDetails.get(i).getFileName() %>">Download</a></span></td> |
|
||||||
</tr> |
|
||||||
<% } %> |
|
||||||
</tbody> |
|
||||||
</table> |
|
||||||
<div class="margin_top_15px"> |
|
||||||
<a id="fileUpload" class="hyperLink" href="<%=request.getContextPath()%>/fileupload.jsp">Back</a> |
|
||||||
</div> |
|
||||||
</div> |
|
||||||
</body> |
|
||||||
</html> |
|
@ -1,73 +0,0 @@ |
|||||||
* { |
|
||||||
box-sizing: border-box; |
|
||||||
} |
|
||||||
|
|
||||||
.margin_top_15px { |
|
||||||
margin-top: 15px; |
|
||||||
} |
|
||||||
|
|
||||||
.panel { |
|
||||||
display: block; |
|
||||||
padding: 15px; |
|
||||||
border: 1px solid #c0c0c0; |
|
||||||
width: 849px; |
|
||||||
margin: 52px 0px 0px 32px; |
|
||||||
} |
|
||||||
|
|
||||||
label { |
|
||||||
display: inline-block; |
|
||||||
margin-bottom: 5px; |
|
||||||
} |
|
||||||
|
|
||||||
.form_group { |
|
||||||
margin: 10px; |
|
||||||
} |
|
||||||
|
|
||||||
.btn_primary { |
|
||||||
color: #fff; |
|
||||||
background-color: #0275d8; |
|
||||||
border-color: #0275d8; |
|
||||||
} |
|
||||||
|
|
||||||
.btn { |
|
||||||
display: inline-block; |
|
||||||
padding: 10px; |
|
||||||
text-align: center; |
|
||||||
white-space: nowrap; |
|
||||||
vertical-align: middle; |
|
||||||
cursor: pointer; |
|
||||||
border: 1px solid transparent; |
|
||||||
} |
|
||||||
|
|
||||||
.input_error { |
|
||||||
color: #DE3330; |
|
||||||
padding: 5px; |
|
||||||
} |
|
||||||
|
|
||||||
.bordered_table { |
|
||||||
border-collapse: collapse; |
|
||||||
width: 100%; |
|
||||||
table-layout: fixed; |
|
||||||
} |
|
||||||
|
|
||||||
.bordered_table tr,th,td { |
|
||||||
border: 1px solid #333; |
|
||||||
} |
|
||||||
|
|
||||||
.bordered_table th,td { |
|
||||||
padding: 5px; |
|
||||||
} |
|
||||||
|
|
||||||
.bordered_table td { |
|
||||||
word-wrap: break-word; |
|
||||||
} |
|
||||||
|
|
||||||
#noFiles { |
|
||||||
color: red; |
|
||||||
font-size: larger; |
|
||||||
} |
|
||||||
|
|
||||||
.hyperLink { |
|
||||||
text-decoration: none; |
|
||||||
cursor: pointer; |
|
||||||
} |
|
@ -1,4 +0,0 @@ |
|||||||
#Created by Apache Maven 3.8.5 |
|
||||||
groupId=ru.molokoin |
|
||||||
artifactId=exchange-servlet |
|
||||||
version=0.1 |
|
@ -1,4 +0,0 @@ |
|||||||
ru\molokoin\FileUploadServlet.class |
|
||||||
ru\molokoin\UploadDetail.class |
|
||||||
ru\molokoin\FileDownloadServlet.class |
|
||||||
ru\molokoin\UploadedFilesServlet.class |
|
@ -1,4 +0,0 @@ |
|||||||
c:\Users\Strannik\Documents\esoe\code\exchange-servlet\src\main\java\ru\molokoin\UploadDetail.java |
|
||||||
c:\Users\Strannik\Documents\esoe\code\exchange-servlet\src\main\java\ru\molokoin\FileUploadServlet.java |
|
||||||
c:\Users\Strannik\Documents\esoe\code\exchange-servlet\src\main\java\ru\molokoin\UploadedFilesServlet.java |
|
||||||
c:\Users\Strannik\Documents\esoe\code\exchange-servlet\src\main\java\ru\molokoin\FileDownloadServlet.java |
|
Loading…
Reference in new issue