Welcome to this lecture now.
We'll go to the second part of the Diago as we have covered these three parts.
Let me recapitulate what we have done in these three parts.
The claims, things like the request or the container, the container creates a request and response
objects request.
In response, objects embody the actual request and responses.
These requests and responses are sent to the head office servlet, not to the actual servlet, but the
head of the subject.
Even if the request is sent, another third will be created and so on and so forth.
So let us see.
No one did.
The second part of the diagram for the second part of the diagram, the fourth part that is part of
this continuum diagram is that this request and response.
Is attached to the Soulet and the container called the service method of the Sonic are the types of
which extension which are which are playing Java Object Exchange contains the service method and the
service method has has different context and configuration related related gaud, which it does.
So we need to call the service method.
So the container called the service method.
This is the fourth step of the life cycle of assembly.
Now the next step.
You know, in the next step.
The service calls the service method father calls douget.
Now, you know that the request has request object embodies the entire detail of the request.
So it also knows that the request is a type of request because it's a type of request.
The service will guard boogied if it was a forced type of request.
It would have called to post.
So in this example, we are calling the do get method.
You know, once the douget method is called, we do the processing, whatever processing we wanted to
do in the in the douget method with the request.
And then we send a response back in this case and demand file.
This is the initiative on file and embodied in the body of response and send it back to the container.
And lastly, the container then sends an HDTV response back to the client, to the browser, and it
does the estimate pitch.
What happens in the server is that this thread is destroyed.
The servlet can wait for another request or it can be destroyed, and the request and response are certainly
destroyed.
So these these things happen that is destroyed means they're dislocated for being sent for garbage collection
in Java.
OK, so this is what happens in the life cycle of a soulet.
And I want to show you in a diagram form, we will also go to the life cycle of possibility in a in
a exampled program, a Java program.
B will create a servlet and we will see what happens.
In what order does it happen?
Destroy happen service happen to get dubost.
In what order do they happen?
When does the object get created.
All these things we to see and then we actually called, then we actually program a sublet and we do
that most probably in the next section.