CCL Home Page
Up Directory CCL t007.html
slide

Jan K. Labanowski: "Tomcat, servlets, JSPs and other friends"

Commong Gateway Interface

Most popular approach:

  • server receives request to execute a file (e.g., C program or perl script). Server knows that the file should be executed rather than returned, since it is in a special directory or has a special extension.
     
  • server starts a new process (forks a new shell, and runs the file) with parameters given on the command line (the GET method), or sent to the program as STDIN (POST method).
     
  • The program send output to STDOUT, and this output is sent back to the browser (with the addition of the few response header lines, e.g., Content-Length).
     
  • External program dies, and if needed again, the whole process has to start again.
     
Very taxing on computer... Each request is requires starting a new program.

Modified: Tue Feb 12 14:01:30 2002 GMT
Page accessed 3415 times since Tue Feb 4 17:56:28 2003 GMT