HTML and CSS Reference
In-Depth Information
sions, although they are actually more general objects. There are no ex-
amples of servlets in this topic.
9.12.1. Returning Results
Before we begin, we need to discuss how server-side applications end.
All server-side applications pass their results back to the server (and on
to the user) by writing those results to the application's standard output
as a MIME-encoded file. Hence, the first line of the application's output
must be a MIME Content-Type descriptor. If your application returns an
HTML document, the first line is:
Content-type: text/html
The second line must be completely empty. Your application can return
other content types, toojust include the correct MIME type. A GIF image,
for example, is preceded with:
Content-type: image/gif
Generic text that is not to be interpreted as HTML can be returned with:
Content-type: text/plain
This is often useful for returning the output of other commands that
generate plain text rather than HTML.
9.12.2. Handling GET Forms
With the GET method, the browser passes form parameters as part of
the URL that invokes the server-side forms application. A typical invoc-
ation of a GET-style application might use a URL like this:
 
Search WWH ::




Custom Search