Multiple choice

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 executes JSP pages using threads from its thread pool rather than spawning separate processes or using CGI. When a JSP is requested, Tomcat uses one of its worker threads to execute the compiled servlet (which is what a JSP becomes after compilation), making it much more efficient than CGI scripts or separate processes.