21.3. Using GET and Processing the Results Directly (HTTP Tunneling)

In the previous example, an applet instructs the browser to display the output of a server-side program in a particular frame. Using the browser to display results is a reasonable approach when you are working with existing services, since most CGI programs are already set up to return HTML documents. However, if you are developing both the client and the server sides of the process, it seems a bit wasteful to always send back an entire HTML document. In some cases, it would be nice to simply return data to an applet that is already running. The applet could then present the data in a graph or some other custom display. This approach is sometimes known as HTTP tunneling since ...

Get Core Web Programming, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.