1 00:00:02,150 --> 00:00:03,220 Welcome, my friends. 2 00:00:03,760 --> 00:00:05,050 Welcome to this lecture. 3 00:00:05,870 --> 00:00:09,380 In the previous lecture, we have created a Hellweg SilverLink. 4 00:00:09,500 --> 00:00:17,150 In this lecture, we will create the Hello World Steps so that we can have a hello word printed out 5 00:00:17,150 --> 00:00:18,050 on your browser. 6 00:00:18,560 --> 00:00:20,120 So let us start with the steps. 7 00:00:20,240 --> 00:00:24,440 Step number one is to set the mind type of the response. 8 00:00:24,860 --> 00:00:29,690 Now, mind type on the Internet is just like on Windows. 9 00:00:29,690 --> 00:00:30,680 That is five type. 10 00:00:30,920 --> 00:00:37,730 There are different types of files like the files, the files, different types of media files. 11 00:00:38,150 --> 00:00:46,630 Similarly, mind type exists and we will use the type of estimate, we'll use the slash estimates. 12 00:00:46,640 --> 00:00:54,620 It can be text on HDMI and we will use the method set content type to set the mind type of response. 13 00:00:55,100 --> 00:00:59,960 OK, we will do this in eclipse for the time being. 14 00:00:59,960 --> 00:01:01,310 We are going through the Tyrepac. 15 00:01:01,670 --> 00:01:07,370 So say step number two is get the print reader from the response again, from the response object. 16 00:01:07,710 --> 00:01:11,350 We will get the print letter object out. 17 00:01:11,950 --> 00:01:13,670 OK, I wouldn't rule it out. 18 00:01:13,880 --> 00:01:19,400 This print writer object will be then used to use this out object. 19 00:01:19,400 --> 00:01:25,310 The third step is use this out object to print, which is print, and then the method is print DeLynn 20 00:01:25,610 --> 00:01:32,800 into HDMI and it will print not on your screen instead of printing on the screen print on the output 21 00:01:32,810 --> 00:01:41,920 would be an estimate file because we have set the mind type to extend DMAN and also because the print 22 00:01:41,920 --> 00:01:43,730 data comes from the response object. 23 00:01:43,910 --> 00:01:50,320 So the response will contain the body and the body will be consisting of XHTML and out object. 24 00:01:50,640 --> 00:01:59,390 We will be sending print statements to this system in the sense, as I said, this is stimulus and responsibility 25 00:01:59,390 --> 00:02:01,810 as our object comes from the response. 26 00:02:02,570 --> 00:02:06,730 This is basically basic concept of extreme jolliest. 27 00:02:07,280 --> 00:02:09,440 If you don't understand it fully, it's OK. 28 00:02:09,450 --> 00:02:10,910 The first three steps are important. 29 00:02:11,120 --> 00:02:13,850 So let's get going in eclipse and do these steps. 30 00:02:16,960 --> 00:02:20,290 This is our project, so very practical. 31 00:02:20,860 --> 00:02:22,000 Let's open the project. 32 00:02:22,390 --> 00:02:27,090 Let's go to our resources source, Baumgart laptop. 33 00:02:28,390 --> 00:02:29,700 Hello, Lloyd Sublette. 34 00:02:31,150 --> 00:02:32,100 This is Idealogue. 35 00:02:32,120 --> 00:02:34,420 So let's go to the douget method. 36 00:02:35,260 --> 00:02:37,500 This is the to get method here. 37 00:02:37,510 --> 00:02:39,070 Already there is some code written. 38 00:02:39,310 --> 00:02:40,540 Let's remove that board. 39 00:02:40,560 --> 00:02:45,030 It was written automatically because this was generated. 40 00:02:45,040 --> 00:02:47,020 The subject was generated automatically. 41 00:02:47,590 --> 00:02:53,650 So let's remove this court and let us start writing comments about the steps. 42 00:02:53,920 --> 00:02:56,560 So first, what I do is I write comments. 43 00:02:57,340 --> 00:03:02,640 I write comments as in the steps, what I want to achieve, and then I write the actual code. 44 00:03:02,890 --> 00:03:05,120 So we plan first and then execute it. 45 00:03:05,740 --> 00:03:06,490 The first is. 46 00:03:11,110 --> 00:03:11,800 Content. 47 00:03:17,130 --> 00:03:18,400 Mine content type. 48 00:03:21,060 --> 00:03:21,690 Constantine. 49 00:03:28,510 --> 00:03:29,230 Excitement. 50 00:03:29,860 --> 00:03:32,350 OK, then the second step is. 51 00:03:39,350 --> 00:03:40,190 Print writer. 52 00:03:42,310 --> 00:03:43,410 I object. 53 00:03:45,460 --> 00:03:46,870 From response. 54 00:03:49,450 --> 00:03:50,410 Third step is. 55 00:03:52,320 --> 00:03:53,430 Use out. 56 00:03:55,600 --> 00:03:56,520 To Gwendolyn. 57 00:03:59,180 --> 00:04:00,130 Achievement. 58 00:04:03,250 --> 00:04:09,760 So these are the three steps that we also went in the previous slide, no, let us light the gold for 59 00:04:09,760 --> 00:04:10,000 it. 60 00:04:10,660 --> 00:04:13,450 The first step will be check mine content. 61 00:04:13,450 --> 00:04:15,020 They fixed a sheet in. 62 00:04:16,860 --> 00:04:22,200 So in response, object response, dark set. 63 00:04:24,840 --> 00:04:31,370 Response said it's coming back to give some auto solutions where it is taking some time. 64 00:04:32,270 --> 00:04:39,430 Yeah, so it automatically gives some suggestion to suggest this set and then spread control space, 65 00:04:40,010 --> 00:04:44,330 you are getting a lot of things said about is character and thinking. 66 00:04:44,760 --> 00:04:46,780 This is in context. 67 00:04:46,790 --> 00:04:49,800 We are able to get all the options that we want. 68 00:04:49,880 --> 00:04:53,690 This is a nifty feature of Eclipse and we will use it very often. 69 00:04:55,330 --> 00:04:58,690 So this is sick content type, this is what we want. 70 00:05:00,680 --> 00:05:09,040 So we undertake a string, so double click this set content type and the stringers, it should be exactly 71 00:05:09,040 --> 00:05:13,520 like this, the forward slash estimate. 72 00:05:14,500 --> 00:05:20,730 OK, so in response, there is this response, we'll take this statement and set it for this. 73 00:05:20,890 --> 00:05:25,740 This is how we set the content type estimate. 74 00:05:26,040 --> 00:05:32,190 The first it almost always, whenever you will be creating a servlet, this would be the first step. 75 00:05:32,200 --> 00:05:36,750 And the second step would also be to get print data out of old object from response. 76 00:05:37,060 --> 00:05:43,030 The third touch step in most cases would be to print initiative in order to process something from request 77 00:05:43,390 --> 00:05:44,940 and so on and so forth. 78 00:05:45,220 --> 00:05:46,920 So you should remember these steps. 79 00:05:46,960 --> 00:05:49,210 These are basically what are called boilerplate. 80 00:05:49,630 --> 00:05:58,750 We exist in practically every sort of leg that you would that, you know, get printed out from response. 81 00:05:58,780 --> 00:06:01,240 OK, so we'll write print later. 82 00:06:06,420 --> 00:06:09,570 WorldSpace, let's let's go forward. 83 00:06:09,820 --> 00:06:13,560 Any of us out is equal to a response. 84 00:06:16,260 --> 00:06:17,880 Get right to the first one. 85 00:06:27,870 --> 00:06:28,980 Now you'll notice. 86 00:06:33,540 --> 00:06:38,690 Important job, I don't I don't think that has already taken place. 87 00:06:41,530 --> 00:06:44,530 Automatically, it is important the. 88 00:06:45,440 --> 00:06:53,990 Plus printout, no response, don't get right, gets the writer OK, as you can see from here that it 89 00:06:53,990 --> 00:06:54,990 returns print, right? 90 00:06:55,280 --> 00:06:55,720 That's right. 91 00:06:55,730 --> 00:06:57,870 We have written print paper over here. 92 00:06:57,890 --> 00:06:58,490 Exactly. 93 00:06:58,500 --> 00:07:00,640 And gets into print right there. 94 00:07:00,770 --> 00:07:02,360 And we just named the object. 95 00:07:02,360 --> 00:07:03,860 OK, we can name it anything. 96 00:07:03,860 --> 00:07:08,360 We can name it out on anything you want and respons. 97 00:07:08,360 --> 00:07:09,460 Don't get it. 98 00:07:09,500 --> 00:07:12,550 So again, we're using the response object here. 99 00:07:12,830 --> 00:07:18,410 You use the response object to set the content type here, also using the response object on the right 100 00:07:18,410 --> 00:07:19,600 that go to print. 101 00:07:19,970 --> 00:07:21,760 Now we will use the output. 102 00:07:24,120 --> 00:07:29,340 Superintending the estimate, according to hear me out, bring Ellen. 103 00:07:37,490 --> 00:07:40,370 We like this and then we select this. 104 00:07:42,250 --> 00:07:43,150 Control seat. 105 00:07:45,490 --> 00:07:55,330 Control copy paste and create a few lines of ascherman will need a few lines of its criminal code to 106 00:07:55,330 --> 00:07:55,970 be printed. 107 00:07:56,020 --> 00:08:01,710 And so we have four lines, four lines, five animals, five. 108 00:08:02,430 --> 00:08:07,770 And here we are, right, it should be eminent, as you know, Ford. 109 00:08:13,780 --> 00:08:14,710 Closing tax. 110 00:08:22,000 --> 00:08:22,890 And bodyboarding. 111 00:08:25,710 --> 00:08:27,240 Each one is four headed. 112 00:08:29,300 --> 00:08:35,170 One closing tag and in this debate or whatever, what we want to do, right. 113 00:08:35,370 --> 00:08:35,770 Hello? 114 00:08:39,670 --> 00:08:40,450 You can remove this. 115 00:08:41,200 --> 00:08:45,640 We don't need this, so we have used the old. 116 00:08:48,310 --> 00:08:55,870 Dylan, Actimel, first, the next lane body, the next lane, each one had a word, which is first 117 00:08:56,530 --> 00:09:03,590 one and then next line slash body, close to 40 plus extremities. 118 00:09:03,630 --> 00:09:08,560 So this goes into an A.M. fight and it becomes an estimate. 119 00:09:09,400 --> 00:09:10,450 That's how we'll do it. 120 00:09:10,750 --> 00:09:14,610 OK, let's run and see what we have done so far. 121 00:09:15,630 --> 00:09:17,370 Controllers see the fire. 122 00:09:19,650 --> 00:09:20,610 Multiservice service. 123 00:09:22,740 --> 00:09:25,680 Bunker eight point zero seven, local stopcock, Efraim. 124 00:09:28,180 --> 00:09:35,530 So you click on Hello, so did the Java test run on server. 125 00:09:36,660 --> 00:09:37,470 Finnish. 126 00:09:38,850 --> 00:09:42,930 Just in case, if you get this dialog box justiceship. 127 00:09:46,540 --> 00:09:51,880 Yes, I opened the file in Firefox. 128 00:09:55,790 --> 00:10:04,010 And you hit Hellewell word in first, hitting each one, hitting one, you hit so large caps you get. 129 00:10:05,100 --> 00:10:05,510 Hello. 130 00:10:06,150 --> 00:10:09,990 So this is what we wanted to achieve and we have achieved it. 131 00:10:10,450 --> 00:10:10,740 OK. 132 00:10:12,720 --> 00:10:17,940 In the next lecture, in the next lecture, we will go to. 133 00:10:19,650 --> 00:10:26,760 We don't know the reason why you go to protect families, because we are using annotations here, who 134 00:10:27,060 --> 00:10:34,160 do you are mapping here to sing and act, which is an annotation slash hello voice. 135 00:10:34,320 --> 00:10:41,040 So this has become the you are it if you're typing this, as do you after one two seven zero zero one 136 00:10:41,490 --> 00:10:49,140 dark 88 slash hello World Soulik, then you will come to this Soulik and this mapping has been done 137 00:10:49,140 --> 00:10:50,160 through annotations. 138 00:10:50,250 --> 00:10:58,360 In the next lecture you will do it to submit the existing content, thereby enough. 139 00:10:59,020 --> 00:10:59,820 Here's your. 140 00:11:00,840 --> 00:11:02,520 So see you in the next lecture. 141 00:11:02,580 --> 00:11:03,000 Thank you.