Machine-translated by Google. Questions are authored in English.
Top

Discussion

How does Tomcat execute a JSP?

  • A.As a CGI script
  • B.As an independent process
  • C.By one of Tomcat's threads
  • D.None of the above is correct.

Answer: C

Correct answer: By one of Tomcat's threads

Tomcat runs the translated servlet inside its own process, allocating one of its threads to each request. Nothing is forked and no separate process is started, which is exactly why servlets are so much faster than CGI scripts - and why they must be written to be thread-safe.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.