1 00:00:01,360 --> 00:00:02,330 Welcome my face. 2 00:00:02,590 --> 00:00:03,880 Welcome to this lecture. 3 00:00:04,540 --> 00:00:08,480 In this lecture, we will continue from where we left off in the previous lecture. 4 00:00:09,190 --> 00:00:17,830 We created the we got loose strings username and password using get better username and get better password 5 00:00:18,340 --> 00:00:26,470 in the next step that we wanted to even validate the username and password. 6 00:00:28,860 --> 00:00:32,440 To do that, first, we have to know the right username and password. 7 00:00:32,850 --> 00:00:39,750 Usually we will go to the database and we will get the username and password and and compare it to what 8 00:00:39,750 --> 00:00:41,340 we have got from get parameter. 9 00:00:43,100 --> 00:00:46,760 But in this case, to keep it simple, we will create. 10 00:00:48,810 --> 00:00:51,450 Instance, variables private. 11 00:00:54,570 --> 00:01:01,160 Credit used me and compared to this, a correct username, locatable. 12 00:01:11,880 --> 00:01:13,530 Private string. 13 00:01:16,560 --> 00:01:17,520 And David. 14 00:01:32,630 --> 00:01:39,410 So this is the correct username and password, if you type or does the user name in your login in your 15 00:01:39,620 --> 00:01:46,130 index page, which becomes the home page, which comes if Gordon is the correct username and password 16 00:01:46,130 --> 00:01:49,490 one, two, three as a password, it should be matched correctly. 17 00:01:49,910 --> 00:01:51,590 And you should go to that welcome page. 18 00:01:51,740 --> 00:01:52,910 It should be a successful. 19 00:01:59,210 --> 00:01:59,820 Validating. 20 00:02:02,500 --> 00:02:03,430 Revalidate. 21 00:02:05,940 --> 00:02:14,010 User name, control space and username and password. 22 00:02:16,810 --> 00:02:17,710 If this is true. 23 00:02:22,050 --> 00:02:23,250 Do something and it's. 24 00:02:24,490 --> 00:02:30,610 Something else, so here invalided, it's getting that headline to this cross. 25 00:02:31,760 --> 00:02:39,580 Click it here to create my third validating string double click it, it will create a method. 26 00:02:43,280 --> 00:02:45,640 Private Boolean validated string username. 27 00:02:54,520 --> 00:02:55,810 We'll say user name. 28 00:04:11,740 --> 00:04:13,290 Or you don't even have to its. 29 00:04:14,500 --> 00:04:18,370 In any case, if this doesn't matter to President Fox. 30 00:04:18,820 --> 00:04:22,780 So this is not a matter to validate control s shape. 31 00:04:25,060 --> 00:04:27,730 So if this is validated, then. 32 00:04:34,490 --> 00:04:40,010 We even have a request despatcher created a request, this sheriff. 33 00:04:41,190 --> 00:04:43,190 Yeah, this one despatching. 34 00:04:45,260 --> 00:04:48,900 Ottis, Equador from Request Object. 35 00:04:48,950 --> 00:04:55,910 We will get a question despatcher and we'll give the name of the. 36 00:04:57,030 --> 00:05:02,220 So there will be something so that will be welcome. 37 00:05:10,450 --> 00:05:12,900 Hottest dark waterbird. 38 00:05:15,910 --> 00:05:17,840 Request and response. 39 00:05:18,040 --> 00:05:21,860 So this is work, this is all we do in the Soviet communication. 40 00:05:22,240 --> 00:05:31,210 First step is that from the request we get the request dispatched and we tell you which servlet or which 41 00:05:31,210 --> 00:05:32,980 e-mail file you are sending it. 42 00:05:33,190 --> 00:05:36,260 So we are giving you all of the correct. 43 00:05:36,460 --> 00:05:43,960 So let the successful Soulik Welcome servlet and then we forward it to this request. 44 00:05:43,960 --> 00:05:45,000 Dispatch, dispatch. 45 00:05:45,070 --> 00:05:48,460 It is forwarded to request and response. 46 00:05:48,460 --> 00:05:51,550 So we send the request in response to the welcome. 47 00:05:52,450 --> 00:05:53,140 So let. 48 00:05:55,630 --> 00:06:04,430 That's what we do, OK else, and it's really a game to question inspection, intercellular communication 49 00:06:04,430 --> 00:06:05,990 will always use the first step. 50 00:06:06,050 --> 00:06:12,080 Will use this to clear the request to speak to you by getting it from the request object and then forwarding 51 00:06:12,080 --> 00:06:17,940 it to this public or forwarding it to the admin side. 52 00:06:18,910 --> 00:06:29,200 Which is a static files, a request control space request, dispatcher orders, request the dark and 53 00:06:29,200 --> 00:06:29,590 get. 54 00:06:33,690 --> 00:06:42,270 We go back to the index, not the statement, but maybe this is the next to demonstrate and artist start 55 00:06:42,270 --> 00:06:42,990 forward. 56 00:06:44,620 --> 00:06:47,020 The question response, yes, so. 57 00:06:48,120 --> 00:06:53,610 If it is successful, validation is successful, you send it to welcome Soulik. 58 00:06:55,120 --> 00:07:01,000 If it is otherwise, if it is not successful, you send it back to next door estimate, the step is 59 00:07:01,000 --> 00:07:08,440 first step is the request was dispatched and then put forward that using the request dispatched with 60 00:07:08,440 --> 00:07:09,640 request and response. 61 00:07:10,960 --> 00:07:12,970 So control this. 62 00:07:13,540 --> 00:07:14,290 This is the Lodin. 63 00:07:14,290 --> 00:07:15,570 So this is our login. 64 00:07:15,580 --> 00:07:22,870 So it will look like and we have created our login subnet and the next step we will create are welcome 65 00:07:22,870 --> 00:07:24,120 servlet, which is our success. 66 00:07:24,120 --> 00:07:25,480 So OK.