Chapter 17: CGI Programming and Beyond -- The Client Side

Note: this page applies to the now-obsolete first edition of the book. For the second edition, please see http://www.corewebprogramming.com.


This chapter of Core Web Programming (pages 912-971) discusses how to make Web-page interfaces to CGI programs. It talks about how to do that in HTML (mostly using HTML forms, but ISINDEX and ISMAP are also covered) as well as via Java applets. For applets, it explains how to send both GET and POST data.

Downloading files: On Windows 95/NT and Unix, click on the links with the right mouse button to save the referenced document to a new location. On any platform, you can also click on the links with the SHIFT key held down. On Netscape, this lets you save the HTML source for the referenced file to a new location. In Internet Explorer, this puts the referenced file in a separate browser window (without frames), where you can then save it.


Contents


HTML Documents in this Chapter

Note: All of these examples submit data to the EchoServer from Chapter 15, so if you want to submit the data and see all the headers sent, as in the examples in the book, you first have to start the EchoServer, plus change the ACTION attribute to point to it.

Java Classes in this Chapter

Java Source Description On-Line Example
SearchYahoo.java. Requires SearchService.java (or get the 1.02 version of SearchService.java). A simple example of an applet as a CGI client. This one talks to the Yahoo! search engine. SearchYahoo.html
SearchExcite.java. Requires SearchService.java (or get the 1.02 version of SearchService.java). A simple example of an applet as a CGI client. This one talks to the Excite search engine. SearchExcite.html
ShowFile.java An applet that sends data via GET and then reads the results itself (rather than having the browser display results). ShowFile.html
Weather.java. The client-side (applet) requires CityChooser.java and WeatherPanel.java. The server-side is answered by the WeatherInfo script, which then invokes WeatherInfo.java. An applet that sends data via POST and then reads the result. Weather.html

URLs in this Chapter