1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
| <%@ page language="java" import="javazoom.upload.*,java.util.*,java.lang.*" %>
<%@ page errorPage="ExceptionHandler.jsp" %>
<jsp:useBean id="upBean" scope="page" class="javazoom.upload.UploadBean" >
<jsp:setProperty name="upBean" property="folderstore" value="C:\work\Intranet\Fichier" />
</jsp:useBean>
<html>
<head>
<title>Espace envoie de fichier</title>
<link rel="stylesheet" type="text/css" href="styles/styles6.css">
<script language="javascript">
puce=new Image;
puce.src='images/skin6/puce_debut.gif';
//-->
</script>
<table class="fond_design" border="0" width="750" cellspacing="0" cellpadding="0" align="center">
<tr>
<td width="32"><img border="0" src="images/skin6/bord_gauche_h.gif" width="3" height="3"></td>
<td width="713" background="images/skin6/bord_h.gif" align="center"><img border="0" src="images/skin6/bord_h.gif" width="1" height="3"></td>
<td width="5"><img border="0" src="images/skin6/bord_droit_h.gif" width="5" height="3"></td>
</tr>
<tr>
<td width="32" background="images/skin6/bord_gauche.gif"><img border="0" src="images/skin6/bord_gauche.gif" width="3" height="1"></td>
<td width="713">
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<table width="102%" height="193" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="86%"> </td>
</tr>
</table>
<table border="0" width="79%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><table border="0" width="483" cellspacing="0" cellpadding="0">
<tr>
<td><img border="0" src="images/skin6/grand_haut_gauche.gif" width="8" height="19"></td>
<td width="100%" background="images/skin6/grand_haut.gif"><b>Bienvenue </b></td>
<td><img border="0" src="images/skin6/grand_haut_droit.gif" width="7" height="19"></td>
</tr>
<tr>
<td background="images/skin6/grand_milieu_gauche.gif"><img border="0" src="images/skin6/grand_milieu_gauche.gif" width="8" height="1"></td>
<td class="fond_tableaux" width="100%">
<p align="left"> </p>
<p align="left"><html>
</font></ul>
<form method="post" action="SimpleUpload.jsp" name="upform" enctype="multipart/form-data">
<table width="60%" border="0" cellspacing="1" cellpadding="1" align="center">
<td align="left"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif"><b>Selectionnez le fichier que vous voulez Uploader :</b></font></td>
</tr>
<tr>
<td align="left"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">
<input type="file" name="uploadfile" size="50">
</font></td>
</tr>
<tr>
<td align="left"><font size="-1" face="Verdana, Arial, Helvetica, sans-serif">
<input type="hidden" name="todo" value="upload">
<input type="submit" name="Submit" value="Upload">
<input type="reset" name="Reset" value="Cancel">
</font></td>
</tr>
<%
if (MultipartFormDataRequest.isMultipartFormData(request))
{
MultipartFormDataRequest mrequest = new MultipartFormDataRequest(request);
String todo = null;
if (mrequest != null) todo = mrequest.getParameter("todo");
if ( (todo != null) && (todo.equalsIgnoreCase("upload")) )
{
Hashtable files = mrequest.getFiles();
if ( (files != null) && (!files.isEmpty()) )
{
UploadFile file = (UploadFile) files.get("uploadfile");
if (file != null) out.println("<li>Form field : uploadfile"+"<BR> Uploaded file : " + file.getFileName()+ +file.getFileSize()+" bytes)"+"<BR> Content Type : "+file.getContentType());
upBean.store(mrequest, "uploadfile");
//attention tout est stocké dans fichiers
}
else
{
out.println("<li>No uploaded files");
}
}
else out.println("<BR> todo="+todo);
}
%>
</table>
<br>
</font></p>
</form>
</p>
<p align="left"><br>
</p></td>
<td background="images/skin6/grand_milieu_droit.gif"><img border="0" src="images/skin6/grand_milieu_droit.gif" width="7" height="1"></td>
</tr>
<tr>
<td><img border="0" src="images/skin6/grand_bas_gauche.gif" width="8" height="8"></td>
<td width="100%" background="images/skin6/grand_bas.gif"><img border="0" src="images/skin6/grand_bas.gif" width="1" height="8"></td>
<td><img border="0" src="images/skin6/grand_bas_droit.gif" width="7" height="8"></td>
</tr>
</table></td>
</tr>
<tr>
<td width="100%" height="10"><img src="images/separateur.gif" border="0" width="1" height="10"></td>
</tr>
<tr>
<td width="100%" height="10"><img src="images/separateur.gif" border="0" width="1" height="10"></td>
</tr>
</table> </td>
</tr>
</table>
</td>
<td width="5" background="images/skin6/bord_droit.gif"><img border="0" src="images/skin6/bord_droit.gif" width="5" height="1"></td>
</tr>
<tr>
<td width="32"><img border="0" src="images/skin6/bord_gauche_b.gif" width="3" height="5"></td>
<td width="713" background="images/skin6/bord_b.gif" align="center"><img border="0" src="images/skin6/bord_b.gif" width="1" height="5"></td>
<td width="5"><img border="0" src="images/skin6/bord_droit_b.gif" width="5" height="5"></td>
</tr>
</table>
</body>
</html> |
Partager