Prentice Hall and Sun Microsystems. Personal use only; do not redistribute.
16.2 The FORM Element
393
Most recent browsers support an additional
ENCTYPE
of
multipart/
form data
. This encoding transmits each of the fields as separate parts
of a MIME compatible document and automatically uses
POST
to sub
mit them. This encoding sometimes makes it easier for the server side
program to handle complex data and is required when using file upload
controls to send entire documents (see Section 16.7). For example, List
ing 16.3 shows a form that differs from
GetForm.html
(Listing 16.1)
only in that
has been changed to
ENCTYPE="multipart/form data">
Figures 16 7 and 16 8 show the results.
Listing 16.3 MultipartForm.html
Using ENCTYPE="multipart/form data"
Using ENCTYPE="multipart/form data"
ENCTYPE="multipart/form data">
First name:
Last name:
Second edition of this book: www.coreservlets.com; Sequel: www.moreservlets.com.
Servlet and JSP training courses by book's author: courses.coreservlets.com.
footer
Our partners:
PHP: Hypertext Preprocessor Best Web Hosting
Java Web Hosting
Jsp Web Hosting
Cheapest Web Hosting
Visionwebhosting.net Business web hosting division of Web
Design Plus. All rights reserved