Sep 26, 2020

JSP JDBC with CRUD operation

 JSP with Bean and Data access object (DAO). JSP is the normal jsp page which uses the bean to store employee information. The DAO file also know an Data Access Layer of our application, contains the code perform database operations such as add, change, delete etc.,

This video demonstrates the best usage of MVC architecture in Java.
➡️ The model here is the EmpBean which holds the employee information.
➡️ The index page is the View which is interface used by client to enter the input and get to view the output.
➡️ The controller here the file which accepts the request from client and sets to bean and bean finally manages the database operation.

CRUD - Create, Read, Update & Delete.

With reference to previous video 👉 https://youtu.be/63cIEAnz7Hc which consist of Add operation & Display operation.

In this video the same example has been extended to support Delete operation using display page. The link (url to delete page and ID of record to be deleted) has been generated in the display page for to delete record.

Once user click the Delete link , the control is transfer to delete.jsp page, where the the ID of the record to be deleted is fetch from request object and the same will be deleted from the emp table.


RaviROza #MVC #JSPJDBC #CRUD #DAO #AdvanceJava #Jdk #Java #Gujarati

OS : Windows 10
Jdk : Version 8
IDE : Eclipse Mars
Server : Apache Tomcat 7

Follow me @
https://raviroza.wordpress.com/
https://raviroza.blogspot.com/
https://www.facebook.com/ravi.oza.it
https://twitter.com/raviozaIT

Subscribe my channel to get latest video notification https://www.youtube.com/user/ravioza101



Sep 25, 2020

JSP JDBC with Bean and DAO

JSP with Bean and Data access object (DAO). JSP is the normal jsp page which uses the bean to store employee information. The DAO file also know an Data Access Layer of our application, contains the code perform database operations such as add, change, delete etc.,

This video demonstrates the best usage of MVC architecture in Java.
➡️ The model here is the EmpBean which holds the employee information.
➡️ The index page is the View which is interface used by client to enter the input and get to view the output.
➡️ The controller here the file which accepts the request from client and sets to bean and bean finally manages the database operation.



RaviROza #MVC #JSPJDBC #DAO #AdvanceJava #Jdk #Java #Gujarati

OS : Windows 10
Jdk : Version 8
IDE : Eclipse Mars
Server : Apache Tomcat 7

Follow me @
https://raviroza.wordpress.com/
https://raviroza.blogspot.com/
https://www.facebook.com/ravi.oza.it
https://twitter.com/raviozaIT

Sep 23, 2020

Steps to Create DSN file & JDBC Connection to MS Access

1. Steps to Create DSN file in Windows 10

2. JDBC Connection to MS Access Database in Java 8


 - How to define Data Source Name (DSN) file in Windows 10 to connect with support database using ODBC driver.

- Connecting with MS Access database in Java 8 using third party database driver called UCanAccess.

Follow me @

https://raviroza.wordpress.com/

https://raviroza.blogspot.com/

https://www.facebook.com/ravi.oza.it

https://twitter.com/raviozaIT

https://www.youtube.com/user/ravioza101

JDBC Callable Statement example

 Callable Statement to execute Stored Procedure in MySQL (Gujarati)



In this video, CallableStatment interface is used to execute stored procedure.

Methods such as execute(), executeUpdate() and executeQuery() is used to execute stored procedures.

In this example, there is also a demonstration on how to insert a record using stored procedure, as well as there is also a procedure that return the name of employee from given employee number. 

Software's used:

JDK for java library

MySql connector (Native Driver file)

Eclipse for compiling and running java code.

MySql Workbench to manage schema

Platform : Windows 10


Follow me @

https://raviroza.wordpress.com/

https://raviroza.blogspot.com/

https://www.facebook.com/ravi.oza.it

https://twitter.com/raviozaIT

https://www.youtube.com/user/ravioza101

JDBC Prepared Statement example

 Prepared Statement to execute queries for MySql (Gujarati)

In this video, PreparedStatement  interface is used to execute queries and other database operation in database.

Methods such as execute(), executeUpdate() and executeQuery() is used to execute queries related to  DDL, DML and respectively.

In this example, there is also a demonstrate regarding reading field values from user using scanner class object. There is also a result set to read values from table using select keyword in queries.

Follow me @

https://raviroza.wordpress.com/

https://raviroza.blogspot.com/

https://www.facebook.com/ravi.oza.it

https://twitter.com/raviozaIT

https://www.youtube.com/user/ravioza101

JDBC Statement example

Statement to execute queries for MySql (Gujarati)

Statement interface is used to execute queries and other database operation in database.

Methods such as execute(), executeUpdate() and executeQuery() is used to execute queries related to  DDL, DML and respectively.

In this example, there is also a demonstrate regarding reading field values from user using scanner class object. There is also a result set to read values from table using select keyword in queries.

Follow me @

https://raviroza.wordpress.com/

https://raviroza.blogspot.com/

https://www.facebook.com/ravi.oza.it

https://twitter.com/raviozaIT

https://www.youtube.com/user/ravioza101

JDBC Connection example

JDBC Connection for MySql using Type-4 Driver (Gujarati)

MySql Database Connection.

In this video, first the packages related to JDBC is imported, then the jar files related to MySql Database is attached in the project in configure build path, then the using Class.forName() the driver is loaded in memory.

After that Url, User and password are defined.

DriverManager.getConnection(url, user, password) is used to open the connection.

And, finally after the successfully opening the connection, the connection is closed to complete the connection internal processes.

MySql Connector Jar Type-4 (MySql Driver file)

https://raviroza.wordpress.com/advance-java/jdbc/

https://mvnrepository.com/artifact/mysql/mysql-connector-java


Follow me @

https://raviroza.wordpress.com/

https://raviroza.blogspot.com/

https://www.facebook.com/ravi.oza.it

https://twitter.com/raviozaIT

https://www.youtube.com/user/ravioza101

Sep 22, 2020

Servlet Revisited

Video was recorded on 8th August 2020, in this session few topics of servlet are revised such as (1) working with Single Thread model and why do we need to use this. (2) Servlet mapping is also revised here in context to what is going to happen if a servlet is mapped from web.xml file and what if a servlet contains both method doGet() and doPost() for handling client request.

It is not the usual scenario where a YouTuber record the video tutorial and published on YouTube, but here I made an extra effort for live tutorial with student interaction. Live demonstration of programming, as well as queries of students are solved in this live session. 


Servlet methods: service, doGet(), doPost(). How to use and manage these three methods with respect to client request type. 


Follow me @

https://raviroza.wordpress.com/

https://raviroza.blogspot.com/

https://www.facebook.com/ravi.oza.it

https://twitter.com/raviozaIT

https://www.youtube.com/user/ravioza101

Single Thread Model in Servlet

 


Single Thread Model:

It was designed to guarantee that only one thread is executed at a time in a given servlet instance’s service method. 

It should be implemented to ensure that servlet can handle only one request at a time.


It is a marker interface and has no methods.

This interface is currently deprecated.

Once the interface is implemented the system guarantees that there’s never more than one request thread accessing a single instance of servlet.


Follow me @

https://raviroza.wordpress.com/

https://raviroza.blogspot.com/

https://www.facebook.com/ravi.oza.it

https://twitter.com/raviozaIT

https://www.youtube.com/user/ravioza101


Servlet Collaboration

 


Some times servlets have to cooperate, i.e. usually by sharing information.

This communication can be called as Sort Servlet collaboration. 

The servlet, which are collaborating, can pass the shared information directly from one servlet to another. Request Dispatcher defines an object that receives requests from the client and sends them to any resource (such as a servlet, HTML file, or JSP file) on the server. The servlet container creates the RequestDispatcher object, which is used as a wrapper around a server resource located at a particular path or given by a particular name.


Follow me @

https://raviroza.wordpress.com/

https://raviroza.blogspot.com/

https://www.facebook.com/ravi.oza.it

https://twitter.com/raviozaIT

https://www.youtube.com/user/ravioza101


#RaviROza #servlet #Servletcollaboration #jdk #java #eclipse  #AdvanceJava #requestdispatcher #Gujarati

Recent Post

Launching of my new Domain

RaviROza.com