Servlet dispatch는 요청 경로를 handler 수명과 service 호출로 연결한다

Servlet 인스턴스는 여러 요청이 공유할 수 있어 요청별 가변 상태를 필드에 두지 않습니다.

  1. 1

    request

    method·path

  2. 2

    lookup

    mapping

  3. 3

    servlet

    공유 instance

  4. 4

    service

    요청별 locals

  5. 5

    response

    status·headers·body

핵심: init·service·destroy와 request/response scope를 분리합니다.