title
Login using Servlet and JSP practical Part 1
description
Industry Ready Java Spring Developer - Live Course : https://bit.ly/jDevIndustry
For More Queries WhatsApp or Call on : +919008963671
website : https://courses.telusko.com/
Instagram : https://www.instagram.com/navinreddyofficial/
Linkedin : https://in.linkedin.com/in/navinreddy20
TELUSKO Android App : https://bit.ly/TeluskoApp
Discord : https://discord.gg/D8hWe9BqfF
Part 2 : https://www.youtube.com/watch?v=gQLQ0t9B5yk
New Servlet JSP tutorial playlist : https://goo.gl/y1kvwc
Spring Boot Tutorials : https://goo.gl/7894NE
Login form creation using jsp and servlet.
In this video We will see :
-how to create login form using Servlet and JSP in Java
-how to create HttpSession for validation
-how to prevent access to specific pages to the users who are not logged in
i.e. show or display pages to only logged in users.
-if user is not logged in then show user login page or redirect the user to login page
else show the page
Java and Spring Framework For beginners with Spring Boot : - http://bit.ly/3LDMj8D
Java Tutorial for Beginners (2023) :- http://bit.ly/3yARVbN
Trainer: Navin Reddy
Editing Monitors :
https://amzn.to/2RfKWgL
https://amzn.to/2Q665JW
https://amzn.to/2OUP21a.
Editing Laptop :
ASUS ROG Strix - (new version) https://amzn.to/2RhumwO
Camera : https://amzn.to/2OR56AV
lens : https://amzn.to/2JihtQo
Mics
https://amzn.to/2RlIe9F
https://amzn.to/2yDkx5F
Subscribe to our other channel:
Navin Reddy : https://www.youtube.com/channel/UCxmkk8bMSOF-UBF43z-pdGQ?sub_confirmation=1
Telusko Hindi :
https://www.youtube.com/channel/UCitzw4ROeTVGRRLnCPws-cw?sub_confirmation=1
Subscribe to the channel and learn Programming in easy way.
Java Tutorial : https://goo.gl/p10QfB
REST Tutorial : https://goo.gl/3mosnz
Kotlin Tutorial : https://goo.gl/JedEzX
Scala Tutorials for Java Developers : https://goo.gl/8H1aE5
C Tutorial Playlist : https://goo.gl/8v92pu
Android Tutorial : https://goo.gl/MzlIUJ
XML Tutorial : https://goo.gl/Eo79do
Design Patterns in Java : https://goo.gl/Kd2MWE
Socket Programming in Java : https://goo.gl/jlMEbg
Spring MVC Tutorial : https://goo.gl/9ubbG2
OpenShift Tutorial for Beginners : https://goo.gl/s58BQH
Spring Framework with Maven : https://goo.gl/MaEluO
Sql Tutorial for Beginners : https://goo.gl/x3PrTg
String Handling in Java : https://goo.gl/zUdPwa
Array in Java : https://goo.gl/uXTaUy
Java Servlet : https://goo.gl/R5nHp8
Exception Handling in Java : https://goo.gl/N4NbAW
detail
{'title': 'Login using Servlet and JSP practical Part 1', 'heatmap': [{'end': 274.856, 'start': 240.803, 'weight': 0.928}, {'end': 417.376, 'start': 388.333, 'weight': 0.868}, {'end': 593.124, 'start': 563.797, 'weight': 0.748}, {'end': 636.505, 'start': 609.535, 'weight': 0.709}, {'end': 929.384, 'start': 911.906, 'weight': 0.813}], 'summary': 'Tutorial covers implementing a login module in servlet and jsp, creating a login page and servlet, user authentication, session management, and login session management, emphasizing secure page creation, user verification, and session attribute usage.', 'chapters': [{'end': 124.846, 'segs': [{'end': 27.768, 'src': 'embed', 'start': 2.013, 'weight': 0, 'content': [{'end': 7.957, 'text': "In this video we'll see how to implement login module in servlet and jsp.", 'start': 2.013, 'duration': 5.944}, {'end': 10.379, 'text': 'so we have already seen the theory of this right.', 'start': 7.957, 'duration': 2.422}, {'end': 11.259, 'text': 'so what we need?', 'start': 10.379, 'duration': 0.88}, {'end': 14.341, 'text': 'we have a login page here which is login.jsp.', 'start': 11.259, 'duration': 3.082}, {'end': 15.601, 'text': 'we have welcome.jsp.', 'start': 14.341, 'duration': 1.26}, {'end': 17.282, 'text': 'we have videos.jsp.', 'start': 15.601, 'duration': 1.681}, {'end': 20.324, 'text': 'so if i go to login.jsp, it should give me to.', 'start': 17.282, 'duration': 3.042}, {'end': 20.804, 'text': 'it will give.', 'start': 20.324, 'duration': 0.48}, {'end': 27.768, 'text': 'it should give me to text field where i will enter my credentials, username, password and if I click on the button,', 'start': 20.804, 'duration': 6.964}], 'summary': 'Implement login module in servlet and jsp with login.jsp, welcome.jsp, and videos.jsp.', 'duration': 25.755, 'max_score': 2.013, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/cYc3FjhMMzI/pics/cYc3FjhMMzI2013.jpg'}, {'end': 64.303, 'src': 'embed', 'start': 39.576, 'weight': 1, 'content': [{'end': 47.46, 'text': "and once you click on the videos link it will take you to videos.jsp page and here we'll try to, uh, show you some.", 'start': 39.576, 'duration': 7.884}, {'end': 49.44, 'text': 'i will try to show some.', 'start': 47.46, 'duration': 1.98}, {'end': 51.3, 'text': 'uh video, something like that.', 'start': 49.44, 'duration': 1.86}, {'end': 53.641, 'text': 'so, uh, we have these three pages.', 'start': 51.3, 'duration': 2.341}, {'end': 54.721, 'text': 'and what i want?', 'start': 53.641, 'duration': 1.08}, {'end': 61.723, 'text': 'i want this welcome.jsp to be a secure page and this videos.jsp to be a secure page, which means if you are logged in,', 'start': 54.721, 'duration': 7.002}, {'end': 64.303, 'text': 'then only you can access these pages.', 'start': 61.723, 'duration': 2.58}], 'summary': 'The goal is to secure welcome.jsp and videos.jsp so only logged-in users can access them.', 'duration': 24.727, 'max_score': 39.576, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/cYc3FjhMMzI/pics/cYc3FjhMMzI39576.jpg'}, {'end': 133.515, 'src': 'embed', 'start': 100.345, 'weight': 2, 'content': [{'end': 102.586, 'text': "i'm not concerned about the view.", 'start': 100.345, 'duration': 2.241}, {'end': 103.686, 'text': 'uh, how it looks.', 'start': 102.586, 'duration': 1.1}, {'end': 104.086, 'text': "so we'll keep.", 'start': 103.686, 'duration': 0.4}, {'end': 105.207, 'text': "we'll try to keep it simple.", 'start': 104.086, 'duration': 1.121}, {'end': 108.448, 'text': 'so we have this about us page which prints the about us data.', 'start': 105.207, 'duration': 3.241}, {'end': 109.268, 'text': 'so what i want?', 'start': 108.448, 'duration': 0.82}, {'end': 111.429, 'text': 'this page should be open page.', 'start': 109.268, 'duration': 2.161}, {'end': 114.01, 'text': 'it should not have any restriction to open.', 'start': 111.429, 'duration': 2.581}, {'end': 124.846, 'text': 'so if i go to login page, so login page and about page, they are unsecured pages and this welcome and videos, they are secure pages.', 'start': 114.01, 'duration': 10.836}, {'end': 133.515, 'text': 'so if i play this, if i run this login.jsp now, if i run this, okay, wow, it will open in my browser.', 'start': 124.846, 'duration': 8.669}], 'summary': 'The about us page should be open without any restrictions; login and about pages are unsecured, while welcome and videos pages are secure.', 'duration': 33.17, 'max_score': 100.345, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/cYc3FjhMMzI/pics/cYc3FjhMMzI100345.jpg'}], 'start': 2.013, 'title': 'Implementing login module in servlet and jsp', 'summary': 'Discusses the implementation of a login module in servlet and jsp, covering the creation of secure and unsecured pages, and focusing on user authentication and access control for different web pages.', 'chapters': [{'end': 124.846, 'start': 2.013, 'title': 'Implementing login module in servlet and jsp', 'summary': 'Discusses the implementation of a login module in servlet and jsp, including the creation of secure and unsecured pages, with a focus on enabling user authentication and access control for different web pages.', 'duration': 122.833, 'highlights': ['The chapter demonstrates the creation of a login module in servlet and JSP, allowing users to enter credentials and access secure pages like welcome.jsp and videos.jsp.', 'The chapter emphasizes the need for welcome.jsp and videos.jsp to be secure pages, accessible only after successful user login, while also showcasing the creation of an unsecured about us page.', 'The chapter outlines the functionality of the about us page, highlighting its unsecured nature and its purpose of displaying specific information.']}], 'duration': 122.833, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/cYc3FjhMMzI/pics/cYc3FjhMMzI2013.jpg', 'highlights': ['The chapter demonstrates the creation of a login module in servlet and JSP, allowing users to enter credentials and access secure pages like welcome.jsp and videos.jsp.', 'The chapter emphasizes the need for welcome.jsp and videos.jsp to be secure pages, accessible only after successful user login, while also showcasing the creation of an unsecured about us page.', 'The chapter outlines the functionality of the about us page, highlighting its unsecured nature and its purpose of displaying specific information.']}, {'end': 277.917, 'segs': [{'end': 209.274, 'src': 'embed', 'start': 172.202, 'weight': 0, 'content': [{'end': 182.925, 'text': "we'll call a servlet here, which is, let's say this the servlet name is login, okay, and we'll keep the method as method as get.", 'start': 172.202, 'duration': 10.723}, {'end': 184.806, 'text': 'now we require a user name.', 'start': 182.925, 'duration': 1.881}, {'end': 193.283, 'text': "so we'll say enter user name and we'll say this is input type equal to text.", 'start': 184.806, 'duration': 8.477}, {'end': 196.707, 'text': "and we'll say this name is equal to uname.", 'start': 193.283, 'duration': 3.424}, {'end': 199.75, 'text': "okay, and we'll say br.", 'start': 196.707, 'duration': 3.043}, {'end': 204.055, 'text': 'the next thing we require is enter password.', 'start': 199.75, 'duration': 4.305}, {'end': 209.274, 'text': "okay, and we'll say this is input type equal to.", 'start': 204.055, 'duration': 5.219}], 'summary': "Creating a servlet 'login' with method 'get' requiring user name and password input.", 'duration': 37.072, 'max_score': 172.202, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/cYc3FjhMMzI/pics/cYc3FjhMMzI172202.jpg'}, {'end': 277.917, 'src': 'heatmap', 'start': 232.54, 'weight': 2, 'content': [{'end': 236.522, 'text': 'so now, once you type all these codes, once you click on this login button, it will call a login.', 'start': 232.54, 'duration': 3.982}, {'end': 240.803, 'text': 'or login.java file, which is login.class file, which is servlet.', 'start': 236.662, 'duration': 4.141}, {'end': 243.624, 'text': 'right now let me create a servlet here.', 'start': 240.803, 'duration': 2.821}, {'end': 246.025, 'text': "so we'll say not here in the java file.", 'start': 243.624, 'duration': 2.401}, {'end': 248.806, 'text': 'so right, click new.', 'start': 246.025, 'duration': 2.781}, {'end': 253.408, 'text': "let's create a servlet and it belongs to a package which is com.login.", 'start': 248.806, 'duration': 4.602}, {'end': 258.89, 'text': 'I have already created that, created that package here com.login and the class name.', 'start': 253.408, 'duration': 5.482}, {'end': 260.551, 'text': "let's say this is login.java.", 'start': 258.89, 'duration': 1.661}, {'end': 266.034, 'text': 'once you click on, finish, it will give you the full source code for sublet.', 'start': 262.313, 'duration': 3.721}, {'end': 269.215, 'text': "right. so we're not concerned about this thing.", 'start': 266.034, 'duration': 3.181}, {'end': 271.315, 'text': "let's make it simple.", 'start': 269.215, 'duration': 2.1}, {'end': 274.856, 'text': "we don't want do post, we just want do get here.", 'start': 271.315, 'duration': 3.541}, {'end': 277.917, 'text': 'okay, not even comments, okay.', 'start': 274.856, 'duration': 3.061}], 'summary': 'Creating a servlet in java file for login, belonging to com.login package.', 'duration': 45.377, 'max_score': 232.54, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/cYc3FjhMMzI/pics/cYc3FjhMMzI232540.jpg'}], 'start': 124.846, 'title': 'Creating a login page and servlet', 'summary': 'Focuses on the process of creating a login page and servlet, covering form action setup, input fields for username and password, and the creation of a servlet for user authentication.', 'chapters': [{'end': 277.917, 'start': 124.846, 'title': 'Creating login page and servlet', 'summary': 'Explains the process of creating a login page and servlet, including setting up the form action, input fields for username and password, and creating a servlet for user authentication.', 'duration': 153.071, 'highlights': ['Explaining the process of setting up the form action and input fields for username and password The chapter explains the process of setting up the form action and input fields for username and password in the login page, including the use of servlet for user authentication.', 'Creating a servlet for user authentication The chapter details the creation of a servlet named login.java within the com.login package for user authentication, using the get method for user login.', 'Demonstrating the creation of a login page and its functionality The chapter demonstrates the creation of a login page with input fields for username and password, along with a submit button that calls a servlet for user authentication.']}], 'duration': 153.071, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/cYc3FjhMMzI/pics/cYc3FjhMMzI124846.jpg', 'highlights': ['The chapter explains the process of setting up the form action and input fields for username and password in the login page, including the use of servlet for user authentication.', 'The chapter demonstrates the creation of a login page with input fields for username and password, along with a submit button that calls a servlet for user authentication.', 'The chapter details the creation of a servlet named login.java within the com.login package for user authentication, using the get method for user login.']}, {'end': 609.535, 'segs': [{'end': 357.473, 'src': 'embed', 'start': 327.151, 'weight': 2, 'content': [{'end': 332.615, 'text': 'again you can fetch this or you can verify this data with the help of database, so you can create a DAO layer,', 'start': 327.151, 'duration': 5.464}, {'end': 337.538, 'text': 'you can request your database to give you the username, password and then you can verify.', 'start': 332.615, 'duration': 4.923}, {'end': 355.032, 'text': "but time let's make it static will say if my you name is equals, if it is equals to Talisco and and the password need to be equals with, let's say,", 'start': 337.538, 'duration': 17.494}, {'end': 357.473, 'text': 'learnings, if this two are same.', 'start': 355.032, 'duration': 2.441}], 'summary': 'Verify user credentials against database using dao layer, or use static values for testing.', 'duration': 30.322, 'max_score': 327.151, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/cYc3FjhMMzI/pics/cYc3FjhMMzI327151.jpg'}, {'end': 417.376, 'src': 'heatmap', 'start': 388.333, 'weight': 0.868, 'content': [{'end': 395.238, 'text': "we'll say sendRedirect and we have to mention here the page name, which is welcome.jsp.", 'start': 388.333, 'duration': 6.905}, {'end': 397.339, 'text': "that's it right, it's that simple.", 'start': 395.238, 'duration': 2.101}, {'end': 400.081, 'text': 'and when I run this code it should call welcome.jsp.', 'start': 397.339, 'duration': 2.742}, {'end': 401.022, 'text': "let's try.", 'start': 400.081, 'duration': 0.941}, {'end': 409.028, 'text': "so if I run this code now, yeah, it's running Okay.", 'start': 401.022, 'duration': 8.006}, {'end': 410.729, 'text': 'so here it will ask you for two things.', 'start': 409.028, 'duration': 1.701}, {'end': 417.376, 'text': "let's enter it is Telisco and we'll say this is, I guess I have entered wrong details.", 'start': 410.729, 'duration': 6.647}], 'summary': 'Using sendredirect to call welcome.jsp, code runs successfully.', 'duration': 29.043, 'max_score': 388.333, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/cYc3FjhMMzI/pics/cYc3FjhMMzI388333.jpg'}, {'end': 536.657, 'src': 'embed', 'start': 511.123, 'weight': 0, 'content': [{'end': 518.304, 'text': 'you can see, I have not logged in right and let me go back to this and say welcome.jsp.', 'start': 511.123, 'duration': 7.181}, {'end': 519.164, 'text': 'and we got welcome.', 'start': 518.304, 'duration': 0.86}, {'end': 525.311, 'text': "it's because we have not mentioned that we need to check for the login now.", 'start': 520.188, 'duration': 5.123}, {'end': 526.731, 'text': 'how to verify that user is logged in.', 'start': 525.311, 'duration': 1.42}, {'end': 529.653, 'text': 'anyway, you are able to access the welcome page right.', 'start': 526.731, 'duration': 2.922}, {'end': 530.814, 'text': 'so what we can do?', 'start': 529.653, 'duration': 1.161}, {'end': 532.354, 'text': 'whenever a user log in?', 'start': 530.814, 'duration': 1.54}, {'end': 535.256, 'text': 'we will set the data into a session.', 'start': 532.354, 'duration': 2.902}, {'end': 536.657, 'text': 'now how to use session.', 'start': 535.256, 'duration': 1.401}], 'summary': 'Discussion about logging in, verifying user login, and using sessions for data storage.', 'duration': 25.534, 'max_score': 511.123, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/cYc3FjhMMzI/pics/cYc3FjhMMzI511123.jpg'}, {'end': 593.124, 'src': 'heatmap', 'start': 563.797, 'weight': 0.748, 'content': [{'end': 570.202, 'text': "we'll say this is we'll set the label, which is, let's say, username as a label,", 'start': 563.797, 'duration': 6.405}, {'end': 574.605, 'text': 'and the data we need to send is the uname which he has entered while login.', 'start': 570.202, 'duration': 4.403}, {'end': 575.966, 'text': "so let's say this is uname.", 'start': 574.605, 'duration': 1.361}, {'end': 578.258, 'text': 'Sounds good.', 'start': 577.918, 'duration': 0.34}, {'end': 581.499, 'text': 'So we have set the data into this session.', 'start': 578.278, 'duration': 3.221}, {'end': 584.42, 'text': 'Now in the welcome page, we need to check.', 'start': 582.28, 'duration': 2.14}, {'end': 588.382, 'text': 'So before executing anything, we need to check that was the data he has entered.', 'start': 584.641, 'duration': 3.741}, {'end': 590.543, 'text': 'So how to check that?', 'start': 589.122, 'duration': 1.421}, {'end': 593.124, 'text': "So we'll check if.", 'start': 591.123, 'duration': 2.001}], 'summary': 'Setting username label as uname for session data.', 'duration': 29.327, 'max_score': 563.797, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/cYc3FjhMMzI/pics/cYc3FjhMMzI563797.jpg'}], 'start': 277.917, 'title': 'User authentication and session management in java', 'summary': 'Covers fetching and verifying user details, including username and password, and emphasizes user session management, redirecting users upon successful login, and using session attributes to verify user login status.', 'chapters': [{'end': 357.473, 'start': 277.917, 'title': 'Fetching and verifying user details in java', 'summary': 'Discusses fetching user details from a request and verifying them, including mentioning the process of fetching username and password from a request and verifying them with hardcoded values.', 'duration': 79.556, 'highlights': ["Fetching the username and password from a request using 'request.getParameter' method.", 'Demonstrating the process of verifying user details with hardcoded values for username and password.', 'Explaining the option of verifying user details with a database using a DAO layer.']}, {'end': 609.535, 'start': 357.473, 'title': 'User session management in java web development', 'summary': 'Discusses the implementation of user session management in java web development, focusing on redirecting users to welcome.jsp upon successful login and prompting them to login again if the credentials are wrong, without deploying the application. it also emphasizes the importance of using session attributes to verify user login status.', 'duration': 252.062, 'highlights': ['The chapter discusses the implementation of user session management in Java web development It provides insights into the practical implementation of user session management in Java web development.', 'Redirecting users to welcome.jsp upon successful login and prompting them to login again if the credentials are wrong The code demonstrates redirecting users to welcome.jsp upon successful login and prompting them to login again if the credentials are wrong.', 'Emphasizes the importance of using session attributes to verify user login status The chapter emphasizes the importance of using session attributes to verify the user login status, thus ensuring secure access to the welcome.jsp page.']}], 'duration': 331.618, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/cYc3FjhMMzI/pics/cYc3FjhMMzI277917.jpg', 'highlights': ['Emphasizes the importance of using session attributes to verify user login status The chapter emphasizes the importance of using session attributes to verify the user login status, thus ensuring secure access to the welcome.jsp page.', 'Redirecting users to welcome.jsp upon successful login and prompting them to login again if the credentials are wrong The code demonstrates redirecting users to welcome.jsp upon successful login and prompting them to login again if the credentials are wrong.', 'Explaining the option of verifying user details with a database using a DAO layer.', 'Demonstrating the process of verifying user details with hardcoded values for username and password.', 'Covers fetching and verifying user details, including username and password, and emphasizes user session management.']}, {'end': 1053.127, 'segs': [{'end': 636.505, 'src': 'heatmap', 'start': 609.535, 'weight': 0.709, 'content': [{'end': 616.14, 'text': "right? if that is the case, we'll again call response.sendRedirect.", 'start': 609.535, 'duration': 6.605}, {'end': 617.821, 'text': "let's call login.jsp.", 'start': 616.14, 'duration': 1.681}, {'end': 623.858, 'text': 'okay, if not, then it will print welcome.', 'start': 620.816, 'duration': 3.042}, {'end': 625.078, 'text': "let's try.", 'start': 623.858, 'duration': 1.22}, {'end': 626.559, 'text': "let's go back to opera.", 'start': 625.078, 'duration': 1.481}, {'end': 627.8, 'text': 'so is it opera?', 'start': 626.559, 'duration': 1.241}, {'end': 629.121, 'text': 'this is what this is opera.', 'start': 627.8, 'duration': 1.321}, {'end': 636.505, 'text': "now i'm trying to access welcome.jsp without doing login, and if i say enter, you can see, we got login page.", 'start': 629.121, 'duration': 7.384}], 'summary': 'Testing login process with redirects and accessing welcome.jsp without login.', 'duration': 26.97, 'max_score': 609.535, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/cYc3FjhMMzI/pics/cYc3FjhMMzI609535.jpg'}, {'end': 934.187, 'src': 'heatmap', 'start': 911.906, 'weight': 0.813, 'content': [{'end': 921.359, 'text': 'we have to say this is user name and we need to do one more thing, which is session.invited, so that it will remove all the data.', 'start': 911.906, 'duration': 9.453}, {'end': 923, 'text': 'okay, now, let me.', 'start': 921.359, 'duration': 1.641}, {'end': 924.321, 'text': 'i hope it will work now.', 'start': 923, 'duration': 1.321}, {'end': 929.384, 'text': 'so let me run this and again, this will be opened in a firefox.', 'start': 924.321, 'duration': 5.063}, {'end': 934.187, 'text': "that's my default browser for the eclipse.", 'start': 929.384, 'duration': 4.803}], 'summary': 'Updating user name and session.invited to remove data, running in firefox browser.', 'duration': 22.281, 'max_score': 911.906, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/cYc3FjhMMzI/pics/cYc3FjhMMzI911906.jpg'}, {'end': 981.006, 'src': 'embed', 'start': 952.532, 'weight': 0, 'content': [{'end': 954.173, 'text': 'let me log out.', 'start': 952.532, 'duration': 1.641}, {'end': 955.073, 'text': "okay, that's it.", 'start': 954.173, 'duration': 0.9}, {'end': 956.214, 'text': "I've logged out.", 'start': 955.073, 'duration': 1.141}, {'end': 960.036, 'text': 'let me go to videos.jsp page or different tab, and if I click on, ok, you get the login page.', 'start': 956.214, 'duration': 3.822}, {'end': 962.181, 'text': 'Awesome, right.', 'start': 961.741, 'duration': 0.44}, {'end': 964.082, 'text': "so that's how you manage this session.", 'start': 962.181, 'duration': 1.901}, {'end': 967.983, 'text': 'or you manage the login session in servlet and jsp.', 'start': 964.082, 'duration': 3.901}, {'end': 970.443, 'text': 'We can even navigate from after.', 'start': 968.603, 'duration': 1.84}, {'end': 974.484, 'text': 'once you click on logout button, you can navigate to the login page.', 'start': 970.443, 'duration': 4.041}, {'end': 981.006, 'text': 'we can simply write this is what response.send redirect.', 'start': 974.484, 'duration': 6.522}], 'summary': 'The session management in servlet and jsp allows for navigating to the login page upon logout using response.sendredirect.', 'duration': 28.474, 'max_score': 952.532, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/cYc3FjhMMzI/pics/cYc3FjhMMzI952532.jpg'}, {'end': 1024.147, 'src': 'embed', 'start': 999.33, 'weight': 1, 'content': [{'end': 1005.436, 'text': 'when you click on this login button, it will take you to login dot login servlet, where you will verify your credentials.', 'start': 999.33, 'duration': 6.106}, {'end': 1008.198, 'text': 'if your username is right, it will take you to welcome dot jsp.', 'start': 1005.436, 'duration': 2.762}, {'end': 1011.171, 'text': 'otherwise it will take you to login.jsp.', 'start': 1009.229, 'duration': 1.942}, {'end': 1014.916, 'text': 'but before going to welcome.jsp, it will set the attribute as a username.', 'start': 1011.171, 'duration': 3.745}, {'end': 1021.104, 'text': 'when you go to welcome.jsp, you can print the same username, but before that it will check are you logged in?', 'start': 1014.916, 'duration': 6.188}, {'end': 1022.986, 'text': 'how can you check that you are logged in?', 'start': 1021.104, 'duration': 1.882}, {'end': 1024.147, 'text': 'it will check for the attribute.', 'start': 1022.986, 'duration': 1.161}], 'summary': 'Clicking login button takes you to login servlet. username verification leads to welcome or login.jsp.', 'duration': 24.817, 'max_score': 999.33, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/cYc3FjhMMzI/pics/cYc3FjhMMzI999330.jpg'}], 'start': 609.535, 'title': 'Managing login sessions', 'summary': 'Demonstrates the process of managing login sessions in servlet and jsp, including setting up the login and welcome pages, using jstl to display the username, implementing a logout function, and navigating between different pages based on the login status.', 'chapters': [{'end': 1053.127, 'start': 609.535, 'title': 'Managing login sessions in servlet and jsp', 'summary': 'Demonstrates the process of managing login sessions in servlet and jsp, including setting up the login and welcome pages, using jstl to display the username, implementing a logout function, and navigating between different pages based on the login status, with a comprehensive demonstration of the entire process.', 'duration': 443.592, 'highlights': ['The process of managing login sessions in servlet and JSP, including setting up the login and welcome pages, using JSTL to display the username, implementing a logout function, and navigating between different pages based on the login status. The demonstration covers the complete process of managing login sessions, including setting up the login and welcome pages, using JSTL to display the username, implementing a logout function, and navigating between different pages based on the login status.', 'The verification process for credentials in the login servlet, with redirection to the welcome page upon successful login and to the login.jsp page upon unsuccessful login. Upon clicking the login button, the verification process for credentials in the login servlet is demonstrated, with redirection to the welcome page upon successful login and to the login.jsp page upon unsuccessful login.', 'The mechanism for checking the login status and displaying the username using JSTL in the welcome.jsp page. The chapter illustrates the mechanism for checking the login status and displaying the username using JSTL in the welcome.jsp page.']}], 'duration': 443.592, 'thumbnail': 'https://coursnap.oss-ap-southeast-1.aliyuncs.com/video-capture/cYc3FjhMMzI/pics/cYc3FjhMMzI609535.jpg', 'highlights': ['The process of managing login sessions in servlet and JSP, including setting up the login and welcome pages, using JSTL to display the username, implementing a logout function, and navigating between different pages based on the login status.', 'The verification process for credentials in the login servlet, with redirection to the welcome page upon successful login and to the login.jsp page upon unsuccessful login.', 'The mechanism for checking the login status and displaying the username using JSTL in the welcome.jsp page.']}], 'highlights': ['The chapter demonstrates the creation of a login module in servlet and JSP, allowing users to enter credentials and access secure pages like welcome.jsp and videos.jsp.', 'The chapter emphasizes the need for welcome.jsp and videos.jsp to be secure pages, accessible only after successful user login, while also showcasing the creation of an unsecured about us page.', 'The chapter outlines the functionality of the about us page, highlighting its unsecured nature and its purpose of displaying specific information.', 'The chapter explains the process of setting up the form action and input fields for username and password in the login page, including the use of servlet for user authentication.', 'The chapter demonstrates the creation of a login page with input fields for username and password, along with a submit button that calls a servlet for user authentication.', 'The chapter details the creation of a servlet named login.java within the com.login package for user authentication, using the get method for user login.', 'Emphasizes the importance of using session attributes to verify the user login status, thus ensuring secure access to the welcome.jsp page.', 'The code demonstrates redirecting users to welcome.jsp upon successful login and prompting them to login again if the credentials are wrong.', 'Explaining the option of verifying user details with a database using a DAO layer.', 'Demonstrating the process of verifying user details with hardcoded values for username and password.', 'Covers fetching and verifying user details, including username and password, and emphasizes user session management.', 'The process of managing login sessions in servlet and JSP, including setting up the login and welcome pages, using JSTL to display the username, implementing a logout function, and navigating between different pages based on the login status.', 'The verification process for credentials in the login servlet, with redirection to the welcome page upon successful login and to the login.jsp page upon unsuccessful login.', 'The mechanism for checking the login status and displaying the username using JSTL in the welcome.jsp page.']}