Introduction

CGI Applications

The way a CGI application communicates with the Web browser is simple: when the user presses a button on an HTML form, with an associated action (such as Submit), the browser starts the application whose path is indicated inside the HTML form declaration. It sends data corresponding to the HTTP request and to the input form information in the usual file descriptor In, stores within environment variables the transaction environment of the request, and waits for the application message, expected in its Out canal. The In and Out canals are accessible via the class CGI_IN_AND_OUT.

HTML forms are an easy way to collect user entries in a web page, which are sent by the browser to the CGI application. A simple example of a form is:

<form action="/cgi-bin/convert.exe" method="post">
   <input type="text" name="Celsius">
   <input type="submit">
</form >

When the user presses the submit button, the browser will launch the application located at /cgi-bin/convert.exe on the server, will use the HTTP Post protocol, and will store among others the environment variable Celsius with the value entered by the user.

Advantages of using EiffelWeb

With EiffelWeb, you can: