An HTTP request processing process
Flow chart:
St=>start: Start
e=>end: End
op=>operation: The server first obtains the HTTP TCP socket connection
op1=>operation: Read HTTP protocol content from socket
op2=>operation: Parsing HTTP protocol request headers
op3=>operation: Gets the path of the requested resource in the request header
op4=> Operation: Get the path to the servlet
op5=>operation: Read the static resource file and return to
op6=>operation: Get servelt name
op7=> Operation: Loading a new servlet instance
op8=>operation: Invoking the Servlet's service method
Op9=>operation: Returning an exception to the client
OP10 =>operation: Returns an exception to
the client op11=>operation: Get a single instance of the servlet
op12=>operation: Returns the servlet instance processing result
cond =>condition: Request whether the resource is a dynamic resource.
cond1=>condition: Does the servlet name exist.
whether the Cond2=>condition:servlet is a single case.
st->op->op1->op2->op3->cond->op4->op6->cond1->cond2->op8->op12->e
cond (YES)->OP4
cond (NO)->op5->e
cond1 (yes)->cond2 cond1
(NO)->op9->e
Cond2 (yes)->OP11->OP8
cond2 (NO)->OP7->OP8
This is a streamlined process.