Prentice Hall and Sun Microsystems. Personal use only; do not redistribute.
Chapter
16
his chapter discusses using HTML forms as front ends to servlets or
other server side programs. These forms provide simple and reliable
T
user interface controls to collect data from the user and transmit it to
the servlet. The following chapter discusses the use of applets as servlet front
ends. Using applets in this role requires considerably more effort and has some
security limitations. However, it permits a much richer user interface and can
support significantly more efficient and flexible network communication.
To use forms, you'll need to know where to place regular HTML files in
order to make them accessible to the Web server. This location varies from
server to server, but with the JSWDK and Tomcat, you place an HTML file in
install_dir/webpages/path/file.html
and then access it via
http://localhost/path/file.html
(replace
localhost
with the real
hostname if running remotely).
16.1 How HTML Forms Transmit Data
HTML forms let you create a variety of user interface controls to collect
input on a Web page. Each of the controls typically has a name and a value,
where the name is specified in the HTML and the value comes either from
the HTML or by means of user input. The entire form is associated with the
385
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