O'Reilly logo

Java™ 2 Enterprise Edition (J2EE™) Web Component Developer Exam Cram™ 2 (Exam 310-080) by Alain Trottier

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 7. Thread-Safe Servlets

Terms you'll need to understand:

  • Threads

  • Multithreads and single threads

  • Thread-safe attribute scopes

  • SingleThreadModel

Techniques you'll need to master:

  • Identify which attribute scopes are thread-safe.

  • Understand the differences between the multithreaded and single-threaded servlet models.

  • Identify the interface used to declare that a servlet must use the single-threaded model.

This chapter provides an explanation of servlet threads and servlets that are considered thread-safe.

Servlet Threads

A thread is a single execution process, a single sequential flow of control within a given program. The container runs several threads at once. The way the server works begins with at least one thread listening to the port for HTTP ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required