O'Reilly logo

MySQL™ and JSP™ Web Applications: Data-Driven Programming Using Tomcat and MySQL by James Turner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Moving from CGI to Servlets

Servlets represented the second step that Java-enabled Web servers took away from the old CGI paradigm. In CGI-based Web programming, the CGI program was an external program run by the server. It took input from environment variables and the standard input stream, and it sent its response back via standard output.

CGI-based designs worked well for quite a long time, but they had a number of problems. For one thing, a significant processing cost was associated with spawning a new process each time a CGI request came in. In addition, it was extremely difficult to carry persistent data around because each process started fresh.

The first step was to allow designers to link their own libraries into the running server binary ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required