# 프론트 컨트롤러 패턴 소개

**각각 독립된 서블릿 컨트롤러들을 하나의 FrontController라는 서블릿을 만들어서 요청이 들어오면 해당하는 컨트롤러들이 있는지 확인하고 있다면 각 컨트롤러로 매핑한다!**

FrontController 패턴 특징

* 프론트 컨트롤러 서블릿 하나로 클라이언트의 요청을 받음
* 프론트 컨트롤러가 요청에 맞는 컨트롤러를 찾아서 호출
* **공통 처리 가능**
* **프론트 컨트롤러를 제외한 나머지 컨트롤러는 서블릿을 사용하지 않아도 됨❓**\
  **=>프론트 컨트롤러가 써블릿 기능을 다하기 때문이다.**

스프링 웹 MVC와 프론트 컨트롤러

* **스프링 웹 MVC의 핵심**도 바로 **FrontController**
* **스프링 웹 MVC의 DispatcherServlet**이 **FrontController 패턴**으로 구현되어 있음


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://heunnajo.gitbook.io/mvc/4.-mvc/undefined.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
