|Chapter 17: Using Applets As Servlet Front Ends|
|Source Code in This Chapter|
TextField, then uses it to build three distinct URLs with embedded
GETdata: one each for Google, Infoseek, and Lycos. The browser is directed to retrieve each of these URLs, displaying them in side-by-side frame cells. Uses the SearchSpec class to represent information about the search engines.
QueryCollectionobtains the strings by means of a serialized object input stream connected to the QueryGenerator.java servlet.
isDoneand null for
getQueries. Meanwhile, it starts a
Threadto request an array of query strings from the server, reading them in one fell swoop by means of an
ObjectInputStream. Once they’ve all arrived, they are placed in the location
getQueriesreturns, and the
isDoneflag is switched to
true. Used by the
ObjectOutputStreamto applet or other Java client.
emailAddressparameters and sends them via
POSTto the host, port, and URI specified. Uses the LabeledTextField class. The first example in the book submits the result to the ShowParameters servlet from Chapter 3.
|URLs in This Chapter|