-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME
More file actions
34 lines (28 loc) · 905 Bytes
/
README
File metadata and controls
34 lines (28 loc) · 905 Bytes
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
Very simple Java upload servlet. Source from https://github.com/valums/file-uploader.git
**This is not built on Servlet 3.0 and can be used in most java containers.
To build:
1. get source
2. get Maven
3. navigate to source top level directory
4. run 'mvn install' from command line
5. build will be in target/JavaUploadServlet.jar
6. add to you projects web.xml:
<servlet>
<servlet-name>UploadServlet</servlet-name>
<servlet-class>UploadServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>UploadServlet</servlet-name>
<url-pattern>/upload</url-pattern>
</servlet-mapping>
7. test page
<html>
<head></head>
<body>
<p>Commons File Upload Example</p>
<form action="upload" enctype="multipart/form-data" method="POST">
<input type="file" name="file1"><br>
<input type="Submit" value="Upload File"><br>
</form>
</body>
</html>