121 Java login page example with database | RequestDispatcher object | adv java Servlet

Опубликовано: 18 Декабрь 2018
на канале: tech fort
663
42

Login form creation using HTML and servlet, Oracle/MYsql Database. In this video We will see : -how to create login form using Servlet and HTML, Oracle Database in Java -how to create RequestDispatcher for forwarding request -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, A Simple HTML Servlet Login Example using Tomcat server. This Example contains a HTML login form, which when when submitted goes to a Servlet. In the servlet the login credentials are checked, and then the user is redirected to a Destination page on successful
#servlet #login #page #example #with #database #advance #java #servlet #tutorial
Example java web application using above three ways to create RequestDispatcher object: Approach1:(Using Request object)
Deployment Directory Structure:
-------------------------------
37LoginWA
-------
|----------login.html
|----------key1.jpg
|----------WEB-INF
|----------web.xml
|----------lib
|--------ojdbc14.jar
|----------classes
|-------SourceServlet.java
|-------DestinationServlet.java
|----------*.class

Create table users1 (uname varchar(20),pwd varchar(20));
insert into users1 values('yogeshb','pass1');
insert into users1 values('bhosale','pass2');
insert into users1 values('Pramod','nopass');

Compile the servlets

Start the Tomcat server

Memory leak issues was coming becuas of in last session of tomcat connection with Oracle DB i kept ojdbc14.jar in lib folder of tomcat C:\Program Files\Apache Software Foundation\Tomcat 9.0\lib

and today while creating 37LoginWA again i kept ojdbc14.jar in lib folder of 37LoginWA C:\Program Files\Apache Software Foundation\Tomcat 9.0\webapps\37LoginWA\WEB-INF\lib

So remove/delete ojdbc14.jar from either of lib folder

Test the web application


open the browser and test

http://localhost:2020/37LoginWA

#java #login #register #form #page #project #source_code #netbeans #mysql #sqlyog #source #code #step #students #beginners #login #registration #form #database