Multiple choice java

How does Tomcat execute a JSP?

  1. As a CGI script

  2. As an independent process

  3. By one of Tomcat's threads

  4. None of the above is correct.

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

Tomcat, like most modern Java Servlet containers, uses a thread-based model. Each request for a JSP/Servlet is handled by a thread from a pre-allocated pool, rather than spawning a new process or using CGI scripts, which is much more efficient.