jpeg or image / gif for other images. MIME types also exist for XML , multime-
dia, and applications.
A POST request instructs the server to execute an application to process a
block of information. A POST request can be issued within HTML to send
user-specified form data to the server for processing. The server then pro-
cesses the request and sends back a response, as in the GET . The traditional
method for processing the request is the Common Gateway Interface ( CGI )
command. CGI simply starts a program on the server on behalf of the client.
This architecture can result in poor performance, because each request starts
a process, makes any required enterprise connections, processes the request,
takes down the connection, and then kills the process—an extraordinarily
cycle-expensive process. A significant advance over CGI , and the application
architecture for Java that we will use in this topic, is called a servlet . A Java
servlet is a Java program that stays resident after use. Chapter 3 will begin to
describe some antipatterns of servlet architectures.
HTML and XML
We have been working our way up the food chain to progressively higher level
layers. HTML was originally created as a standard way to format documents
for display, but it has grown to be rich enough to build basic application user
interfaces. Though there are many extensions and versions, its user interfaces
can be flexible, portable, scalable, and efficient. HTML consists of plain text,
marked up with tags. Known as metadata , or data about data, these tags
define how HTML documents are interpreted and rendered.
Where HTML tags attach a structure and meaning to documents, XML
attaches structure and meaning to generic data. With XML , standard types can
be built to do many different things. Hundreds of XML standards already
exist. XML types can be used in a number of ways. XML documents can be
translated with Extensible Stylesheet Language ( XSL ). This translation tech-
nology can generate HTML from XML for easy presentation; it can even repur-
pose data, or translate content from one XML form to another. Within an
application, the Document Object Model ( DOM ) interface can be used to
parse even the most complex XML documents. You can find additional infor-
Numerous other great websites and books on XML are available as well.
Internet layers solve client/server problems
Each successive Internet standard forms an increasingly abstract software
layer. The combination that is the Internet has shown incredible power and