The Common Gateway Interface is a simple process based method of calling scripts to generate dynamic web content. However, there is significant overhead in creating a Process for every client request.
FastCGI (aka FCGI) was implemented to use TCP sockets to provide CGI like data to a long-lived process. This opens up other high performant possibilities such as in-memory caching, database connection pooling etc... PHP is a popular web scripting language with a sturdy FCGI implementation.
FCGI is a bit of a long-winded and over-complicated spec which scared a lot of people away for a long time, but it is coming back into fashion at the moment.
SCGI (Simple? CGI) does essentially the same thing as FCGI with a much simplified socket protocol.
The CGI Servlet provides bindings for Process based CGI, or Socket based FastCGI. SCGI coming soon.
Also see the Jetty-PHP example.
If you are hoping to use the CGI Servlet to process URIs like /context/script.cgi/path/info then the PathInfoFilter will be of interest.