
Learn the fundamentals of Java web development with JDBC, servlets, and JSPs, covering servlet lifecycle, JDBC usage, JSP basics, the MBC design pattern, security, and advanced JDBC concepts.
Explore how to maximize this JDBC, Servlets, and JSP course with structured sections, quizzes, hands-on labs, and early software setup to master Java web development.
Master Core Java Made Easy, then learn JDBC Servlets and JSP to build web apps, execute SQL statements, connect to databases, and create user interfaces for full stack development.
Download the completed projects from the resources section, unzip, and import them into Eclipse as existing projects (select JDBC basics) so they’re ready to run with Tomcat installed.
Update your development setup by installing Java, Tomcat, Eclipse, and MySQL, while noting version compatibility (Java 16, Tomcat 10, Eclipse) and consulting the documentation for issues.
Install Java 8 by downloading the Java SE Development Kit and accepting the license for Windows, Mac, or Linux. Run the installer, then configure the JDK in Eclipse for Mac.
Install Eclipse IDE for Java EE developers from the Mars releases on the downloads page, download the Windows zip or Mac tar.cz, unzip, and launch Eclipse.
Launch Eclipse, set a workspace, then configure the JDK in preferences by adding the standard VM and selecting the JDK folder (not bin or jre).
Download and install tomcat 8 binaries for Windows, or Mac or Linux, unzip the files, and configure tomcat in Eclipse to use from within the IDE.
Learn how to install MySQL community server on Windows by installing Visual C++ first, running the server installer, setting a root password, and connecting with MySQL Workbench.
Install and launch MySQL Workbench, connect to a local or remote MySQL server, create a database, and run queries in the query window.
Install and configure MySQL and MySQL Workbench in three simple steps—download, install, and configure with a root password—then connect and execute SQL statements using the GUI.
Connect to the MySQL server with MySQL Workbench by creating a local connection (host localhost, port 3306, user root), test the connection, then create database my db.
Learn what a web application is, how it works, and the http protocol powering web client-server communication, including browsers, servers, url, and port 80.
Compare static and dynamic web applications by examining prebuilt html and multimedia for static sites. Dynamic sites generate content on demand with servlets, jsps, and database access.
Handle the client request on a server side program running in a web container like Apache Tomcat by capturing input, querying the database, and returning a dynamic html response.
Explore servlet technology and the servlet life cycle, and learn how the container manages it. Deploy and configure a Java web application in three simple steps in two ways.
The servlet lifecycle uses three methods—init, service, and destroy—driven by the container through instantiation, initialization, servicing, and destruction, with init and destroy called once and service invoked for each request.
Oracle defines a standard web application folder structure for deployment on Tomcat containers, including a root folder, web-inf with web.xml, classes for servlets and logic, and lib for jars.
Explore how servlets, a Java EE technology with an API and a specification, run on a web container to handle browser requests, access databases, and generate dynamic html responses.
Explore servlet annotations in the 3.0 spec to configure components like @WebServlet, @WebInitParam, @WebFilter, and @WebListener, replacing web.xml; this course covers both approaches and explains web.xml overrides.
Navigate Tomcat 10 changes by migrating from javax.servlet to jakarta.servlet while Jakarta EE replaces Java EE, keeping the same specifications and only package names changed.
Create a hello world servlet by extending the servlet class, handling request and response, setting content-type to text/html, and writing hello world to the browser.
Configure the servlet in web.xml using the servlet element to name it and map the url pattern /hello, so the container invokes its service method and returns the response.
Choose between servlet annotations or XML configuration in web.xml to map URLs, and note that Tomcat 10+ uses Jakarta servlet imports instead of javax.servlet.
Deploy the hello world servlet on Tomcat from Eclipse, run on the server, and access it at localhost:80/80/servlet basics/hello; Tomcat maps the URI via web.xml and calls the service.
Create a numbers.html form to capture two numbers, then implement an addition servlet to add them and return the result. Prepare deployment by configuring web.xml in the next lecture.
Create a servlet that reads two numbers from the request using request.getParameter, converts them to long, validates non-null, sums them, and writes the result to the response.
Register the servlet by editing web.xml, renaming hello servlet to edition servlet, and mapping it to a uri. Use this url in the numbers html and run the app.
Learn how the addition servlet processes two numeric inputs by brackets to prevent string concatenation, retrieve parameters with request.getParameter, and submit via a form using the get method to Tomcat.
Begin this section with a big picture of the JDBC architecture, then learn the interfaces that make up the JDBC API and how they work together to perform database operations.
Explore the four components of a jdbc architecture: the jdbc client, the jdbc api, the jdbc driver, and the driver manager, and how they connect application code to the database.
Learn the JDBC API from the java.sql package, including interfaces and classes like Connection, Statement, and ResultSet, to connect to a driver, execute SQL statements, and process results.
Use the driver manager in the JDBC API to locate the appropriate driver and establish a database connection, enabling your Java application to execute SQL operations through the driver.
Explore JDBC basics by performing create, read, update, and delete operations on a bank account table using driver manager, connection, statement, and result set interfaces, plus the service provider mechanism.
Create the account table in the selected database by running account.sql in MySQL Workbench, then execute the create table statement and run a select to verify no rows.
Perform CRUD operations using DML and DQL statements (insert, update, delete, select) from a JDBC client, following five steps: connect, create statement object, execute, process results and exceptions, and close.
Download the MySQL Connector/J JDBC driver, unzip the archive, and copy the jar into the project lib. Then add the jar to the Eclipse build path to enable JDBC access.
Troubleshoot null pointer exceptions by ensuring the MySQL JDBC jar is on your classpath, and load the Connector/J 8 driver class com.mysql.cj.jdbc.Driver.
Ensure the jdbc driver and MySQL connector jars are placed in your web application's lib folder so they join the classpath and prevent class not found and null pointer errors.
Resolve null pointer exceptions in JDBC statements by loading the MySQL driver jar from your project's lib folder or Tomcat's lib folder.
Create ACCOUNTDAO class in com.bharath.jdbc.dao and establish a database connection via DriverManager.getConnection using a jdbc:mysql URL to localhost/mydb with user root and password test, then print the connection.
Explain the jdbc connection string used to connect to a mysql database, highlighting common components and variations across databases. Highlight how Oracle differs, including the driver type thin, the host, port, and database name separated by colon instead of slash.
Learn how the statement interface executes dml and dql statements in jdbc by creating a statement from a connection and using executeUpdate for insert/update/delete, and executeQuery for selects.
Insert the first account row using a statement object and executeUpdate, then verify the insertion with a select query, confirming one row in the account table.
Update the account balance using a JDBC update statement, track affected rows with executeUpdate, and verify the new balance (50000) for account acc_number 1 in the database.
Delete the account using JDBC by executing an update to remove the row where account number equals 1, print the result, and verify that no records remain in the database.
Understand how the JDBC result set represents query results as an object oriented table. Use the next method to advance the cursor and the getXXX methods to read each column.
Learn to read accounts from the database by executing a select with executeQuery, assign the ResultSet to rs, and prepare to iterate it in the next lecture after inserting records.
Learn how to clean up JDBC resources by declaring connection, statement, and resultset in a Java 7 try-with-resources block, with the JRE automatically closing them.
Learn how the driver manager uses the service provider mechanism to load JDBC driver from the classpath, uses the URL to connect, and creates a Connection, Statement, and ResultSet.
Create your first dynamic Java web project with servlets and JDBC to let end users create, read, update, and delete data from a database in their browser.
compare get and post in http: get retrieves data via query strings and is idempotent, while post submits data in the body for creating or updating records and is non-idempotent.
Execute a user use case to create, update, read by email, display, and delete a user; build a dynamic web project in Eclipse and plan servlets for crud operations.
Copy the MySQL connector jar into the web-inf/lib folder of your web application, so the driver class is on the build path, enabling Tomcat to connect to the MySQL database.
Create the user table in your database by loading the user.sql script into MySQL Workbench, selecting the database, and executing a four-column table with first name, email, and password.
Create a user servlet to handle add user form submission via doPost and insert user into the database. Map the servlet with annotations and implement init and destroy, removing doGet.
Implement the init and destroy methods to establish a database connection via DriverManager.getConnection, reuse it in the doPost method, and close the connection in the destroy method.
Load the mysql jdbc driver class manually with Class.forName('com.mysql.jdbc.Driver') to avoid null pointer exceptions on Tomcat 8, since the service provider mechanism is disabled.
Build a dynamic web app with JDBC and servlets by creating an update user servlet that updates a password by email, maps the update URI, and runs on Tomcat.
Create the read user servlet to display all users by handling a get request, executing 'select * from user', and writing an html table with a print writer.
Create static html table headings for first name, last name, and email, then prepare for dynamic rows by iterating the result set in the next lecture.
Learn to generate dynamic HTML by iterating a JDBC resultset with a while loop, creating a table row per record and filling first name, last name, and email.
See the read user servlet in action: deploy on tomcat, access its uri with get, have doGet run a select query, build an html table, and display two records.
Reuse the update user workflow to implement delete by removing the password from the form, adjusting the servlet to delete by email and report 'user deleted' or 'user not found'.
Discover how init params, defined in web.xml as name-value pairs, are passed to a servlet and retrieved in the init method via servlet config, avoiding hard-coded values.
Configure init parameters with the servlet annotation by setting a url pattern and adding @WebInitParam entries for db url, db user, and db password by converting hard-coded values.
Configure the read users servlet via web.xml by setting init parameters such as db url, db user, and password, map the servlet url, and remove annotations.
Read init parameters from web.xml in a jdbc servlet, replacing hard-coded values with config.getInitParameter for db.url, db.user, and db.password to establish a connection.
Understand that the servlet context is an application-wide object created during initialization. Retrieve it via servlet config or via init and service to enable access across all servlets and jsps.
Learn to use the ServletContext to share application data across servlets, manage attributes, access context parameters, dispatch requests, and log information to the server log.
Define context parameters in the web.xml under the web-app element to share name-value pairs across the entire application, retrievable via the servlet context.getInitParameter method.
Learn how servlet context parameters provide database connection information across the entire application, replacing earlier parameters and making configuration accessible from any page.
Access the servlet context via the config object, then retrieve init parameters with the context to configure behavior and create users, while removing unused parameters for clarity.
Understand context parameters in a Tomcat server and how to use them to share information across a Java web application built with JDBC Servlets and JSP.
Learn to access servlet context parameters by listing getInitParameterNames, looping through the names, and retrieving values with getInitParameter to display name and value pairs.
Learn to retrieve and display all context parameter names and values using the Context object, looping through the parameter names and printing name: value pairs.
Learn how prepared statements precompile SQL, use placeholders and setXXX methods to bind parameters, and avoid repeated compilation for multiple inserts or queries to boost performance.
Switch the database and create the product table with id, name, description, and price. Download the product data file, paste it into the workbench, and confirm the table is empty.
Create a project and learn to use a prepared statement to insert product records. Download the DML form for product details (id, name, description, price) and submit via post.
Copy the MySQL JDBC driver jar into your project's source main web app web-inf lib folder so it's automatically added to the classpath, enabling you to test the application.
implement the doPost method to read request parameters, bind them to a prepared statement, execute the update to create a product, and return the result.
Learn to use a prepared statement to update a product's price by id; copy the product, bind id and price from the request, and execute the update to 70000.
Implement a prepared statement update for a product in a servlet and service, binding price and ID to placeholders and verifying the price changes to 70000.
Sample of the reviews:
highly recommended, usually the courses of Professor Bharath are characterized by their extensive explanation in the examples which he himself is writing the code and explaining in detail, you will learn a lot about this subject and enjoy it if you are passionate about Spring and its related topics - Edilberto Ramos Salinas
Very Simple and easy to follow , helpful to learn about web application - chandrachood Raveendran
A good, concise and enlightening course to introduce you to the basics and principals of Spring JPA and Hibernate. - Jack Richter
---
All source code is available for download
Responsive Instructor - All questions answered within 24 hours
Professional video and audio recordings (check the free previews)
----
From the top Java Web Services Course Instructor on UDemy!!!
Covers Servlet 3.1 and JDBC 4
The course builds a strong understanding of JDBC Technology. It gives in to demonstrate why Servlets are the cornerstone of Java’s Web platform. It then shows how JSP is built on the Servlet architecture. Additionally, the class shows students how to use JSTL, custom tags and expression language to reduce Java code in Web pages while adding tremendous power and capability to those pages.
This is not a class that focuses on theory. Participants will find the course is loaded with practical labs and simulations. After taking this class, developers will be able to build Web applications that perform well, are scalable, and that are easier to maintain.
JDBC,Servlets and JSP Course Prerequisite:
Basic Knowledge of Core Java is required. An understanding of Web technologies like HTML and HTTP is helpful.
JDBC,Servlets and JSP Course Objective
Learn the fundamentals of JDBC and using the different interfaces in the JDBC API. Learn how to use Java servlets in the role of Web application control. Identify the options to state management in a Java Web application and understand the pros/cons of each. Understand how JSPs can help to separate Web logic and functionality from page layout. Learn the meaning and importance of MVC