Welcome, my friends.
Welcome to this section.
In this section, we will learn about how to create and so called the HelloWallet.
So this would be the first meaningful servlet as opposed to the previous subject that we had created,
the previous military had created.
But check on the lifestyle metasearch and in what order these lifestyle methods are taking place.
We saw that to go and maintaining a servlet in this section, we will actually create an old Soviet.
Hello, Wolf, Sublieutenant, hello.
Looks like it will be a sublet that sends an estimate saying hello world on your browser.
So on your browser you will see a world.
And it is coming from the Web server from Tomcat.
OK, so let us get going with that and let us start with that opening on Eclipse.
So my eclipse is open, we go to a project which we had created earlier, so little practical.
We opened this project, we go to Java Resources, we go to source on laptops, and we create a new
called Hello World Subject Sauvie.
Right.
Click on the package.
Click on new.
Go to Servlet and Select Servlet.
The Galva package will be the same on the collapse of LIC in the same package will create a new public
health.
And we next.
It'll have a different view on the mapping of HelloWallet subject.
We can expect next.
We don't need to create any steps for a nuclear strike service, any of them, we just need to get and
we need Dubost.
Let us do that.
We'll be using Dugit in our example.
We are giving the Dupas just any of its.
So here we have the Dugit, we have to do just look at this new post we're actually calling the douget,
so eventually that get method is what will be caught in such a split.
Now we're calling to get to now before we start creating the Hello which Soulet, I want you to go to
some Epper barometer's some basic lipase, which will strengthen the concept of your life cycle as well
as it will help you understand what what actually is happening in Saudi Arabia.
This this would be the request, the response and the issue be.
So let us know that piece of glass is what makes the halo work so solid because we extend the deepest
public class, OK, and India's GDP servlet class, that is this service.
So let us go into the subliterate service method.
I hope you know how to go into the deepest of the class.
You will get around this control what around this Linkous form and left click and you're going to be
subject to press control f fine.
And that is you type service open press and find, click find and you'll get to the service method,
the service method we have gone before.
Also you have seen this, this is the service method which gets scored when every request is made.
And from here it will decide whether it wants to go to Google, it wants to work or Lupo's it wants
to work or any other bootlace to delete or whatever it wants to go to.
That method group agreed.
Aside from here on, how that decision is made is also shown over here.
It takes a string method and it says request, get method, request, request.
I should be separate request.
Target method will give you the method name what the actual method is.
And if that is equal to method to get the get method then acquited.
Walter boogied with the same request and response, so the service method takes the same parameters
as the budget, and do they take the request and the response methods of this request in response objects,
these two objects are created by the container and sent into your service.
OK, so these two objects are created by the container and the request is made.
And then these two objects are sent to the service apprentice created and the service method gets the
request and the response object from the request object.
You get the method and the method is checked for whether it does get method or not.
If it is, you get to look.
It is.
Here is the method for method post that you would a method post or you will go method head, you want
to put delete options.
These are the options.
So these are the different these two options to delete, to put it if you're going to do.
What if this is that you're are concerned with only pot and get so we can see the to put it so that
some of the bits of glass will go to the subnet request in response.
And we'll just briefly, we will see some method or methods, important methods that they might use.
So let us see that he needs to be servlet request.
Here he can see the methods of should he be subject to change in our system?
I get cookies, you can get the cookies, I deliver these things later, then you can get the headers.
The you know, these they have identified the body they have.
So you can get the entire part of the info.
You can get stuff like that.
You can get the context what the relative value is again then.
So and this is this this one is important for you to get get session so you can get the session, which
we learned about petitions when we learned about petitions and the state keeping the object stateful.
Then we learned about the use of Xitian.
Just know you just see that there are methods, important methods in HDB subject request as well as
a symbolic response is there should be servlet response.
The method which we are concerned in this particular Section four should not be subject response would
be laying in servlet response.
So it exchange the response of whatever has whatever Matosevic response has actually be.
Subject response also has because of the hierarchy, because of inheritance.
So let gotten so little response now in servlet response, getData is important and second type is important.
No second tintype as it is such the.
So the not this one second type that this is what it is all about.
The second thing that sets the content type of the response being sent to the client.
So you after we have talked about mind types and we said the mind type to see a extinguished estimate
by using second template, we we've learned about this also in the coming next year and get later get
you the data.
As you can see, it returns a print, write the public profile exception.
So it returns a print.
Right.
That this print right object, which we will call it out, will be the object on which we will send
our estimate.
Right.
So whatever estimate it will create in this, I will tell you about this also in the same lecture where
I tell you about.
Said, contenting, OK.
So I just wanted to tell you about the space and get back to the making of a hello world sublet in the
next lecture.
Thank you.