Embedded Ethernet and Internet Complete: Designing and Programming Small Devices for Networking

Chapter 6 showed how a Web page can use HTML to display text and images, including real-time data. Many embedded Web servers also need to display pages that can respond to user input. For example, a Web page might display a virtual control panel that enables users to start, stop, or modify processes controlled by an embedded system. Or a page might display a form that enables users to enter or select values for use in configuring or controlling a device.
Two technologies for enabling Web pages to respond to user input are common gateway interface (CGI) programming and Java servlets. CGI programs and Java servlets can do the following:
Retrieve the current values of variables and place them on a Web page to return to a client.
Receive and act on data provided by a client who clicks a hyperlink or submits an HTML form.
Do just about anything that an ordinary program is capable of, including making calculations, performing logical operations, and accessing I/O ports.
This chapter presents examples of devices that use CGI programming and Java servlets to enable Web pages to respond to user input. A Rabbit module uses CGI programming and a TINI uses Java servlets. The In Depth section of the chapter has more detail about what s involved in using these technologies, plus examples of how a server can serve forms and respond to form data submitted by users.
What method to use to enable a Web page to...