File Upload Test Application
This chapter provides tutorial notes and example codes on file upload test application. Topics include file upload specification, RFC 1867; HTTP POST method and multipart/form-data encryption method; dumping uploaded files back to browser; saving uploaded files on the server.
These sections are omitted from this Web preview version. To view the full content,
see information on how to obtain the full version this book.
RFC 1867 - Form-based File Upload in HTML
Code 1 - Display Options - UploadInit.html
Code 2 - Display Form - UploadForm.jspx
Code 3 - Dump File - UploadDump.jspx
Test 1 - GET Method - Failed
Test 2 - POST Method - Successful
Code 4 - Save File - UploadSave.jspx
Test 3 - Save File - Successful
Code Review - UploadSave.jspx
- RFC 1867 defines a new HTML input type, FILE, for the browser to collect
files to update.
- RFC 1867 defines a new encryption type, multipart/form-data, for the browser
to upload files in the HTTP request body in a multi-part format.
- Uploaded files should be handled as binary data. The new line character
of the last line in the uploaded files should be removed.
- Be careful about saving uploaded files on a Web server.
They should be saved in a secure area. Web server should avoid using the
path name submitted by the browser. Web users could use it to damage your
server file system.
Table of Contents
About This Book
JSP (JavaServer Pages) Overview
Tomcat Installation on Windows Systems
JSP Scripting Elements
Java Servlet Introduction
JSP Implicit Objects
Syntax of JSP Pages and JSP Documents
JSP Application Session
Managing Cookies in JSP Pages
JavaBean Objects and "useBean" Action Elements
Managing HTTP Response Header Lines
Non-ASCII Characters Support in JSP Pages
Performance of JSP Pages
EL (Expression Language)
Overview of JSTL (JSP Standard Tag Libraries)
JSTL Core Library
JSP Custom Tags
JSP Java Tag Interface
Custom Tag Attributes
Multiple Tags Working Together
►File Upload Test Application
Using Tomcat on CentOS Systems
Using Tomcat on macOS Systems
Connecting to SQL Server from Servlet
Developing Web Applications with Servlet
Full Version in PDF/EPUB