J2EE Pattern Front Controller in PetStore

xiaoxiao2021-03-06  18

In general, the system typically requires a central control module to process all requests from different users, which can make corresponding processing according to different types of requests. Front Controller is a mode that solves such problems.

definition:

Use a Controller as the initial point of contact for handling a request. The Controller manages the handling of the request, including invoking security services such as authentication and authorization, delegating business processing, managing the choice of an appropriate view, handling errors, and managing Structure of Content Creation Strategies. Map:

Sequence Diagram:

In PetStore, Front Controller is implemented through MainServlet classes, which inherits the javax.servlet.http.httpservlet class.

This class contains three parts: Request Processor, Web Controller, and Screen Flow Manager, detailed, I have said it in Control Module.

转载请注明原文地址:https://www.9cbs.com/read-72506.html

New Post(0)