Multiple choice general knowledge science & technology

Which of the following has to be implemented to make a servlet thread safe?

  1. SinglethreadModel

  2. SingleThreadedModel

  3. SingleThreadModel

  4. SingleThreadmodel

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

The SingleThreadModel interface in the Servlet API ensures thread safety by guaranteeing that the servlet handles only one request at a time. The servlet container either serializes requests through the servlet or maintains a pool of servlet instances. Options A, B, and D have incorrect spelling/casing - the actual interface name is SingleThreadModel (with capital T, capital M, no 'ed').