Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Why Use Servlets?

servlets
0
Posted

Why Use Servlets?

0

Servlets have a variety of enhancements over plain CGI. The most fundamental advantage of Servlets is that they are tightly coupled to the Web Server. If you recall from the diagram above, CGI scripts are typically launched as a separate process by the web server whose lifetime exists only during the particular user request. It turns out that the CGI model is extremely inefficient and slow especially with interpreted languages such as Perl or Java. First, operating systems typically incur some overhead in simply launching another process. When you think about it, an operating system really has to do quite a bit. It has to: • allocate memory for the process • copy information about the environment that the parent process was running in so that there is a security context • and the web server (parent process) must be constantly aware of the child process in order to send the CGI output back to the user’s web browser. Second, an interpreted language typically has to load an entire program

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.