

{"id":98185,"date":"2021-07-13T09:00:11","date_gmt":"2021-07-13T03:30:11","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=98185"},"modified":"2026-06-01T14:23:25","modified_gmt":"2026-06-01T08:53:25","slug":"online-shopping-system-java-jsp-servlets","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/online-shopping-system-java-jsp-servlets\/","title":{"rendered":"Online Shopping System in Java using JSPs &amp; Servlets"},"content":{"rendered":"<p>The Online Shopping System has become an essential tool for sellers and also for buyers. The online shopping system in java allows buyers to buy goods\/products directly from the seller website and it saves time and money of buyer. There is an advantage of the sellers to attract more customers using online shopping systems and it promotes cashless transactions.<\/p>\n<h3>About Online Shopping Project:<\/h3>\n<p>We will develop following functionalities in online shopping java project:<\/p>\n<ul>\n<li>Seller\/Admin can add the product.<\/li>\n<li>Seller\/Admin can edit the product.<\/li>\n<li>Seller\/Admin can delete the product.<\/li>\n<li>Seller\/Admin can view the product.<\/li>\n<li>Seller\/Admin can view the customers.<\/li>\n<li>Seller\/Admin can view all orders.<\/li>\n<li>Seller\/Admin can view pending orders.<\/li>\n<li>Seller\/Admin have a dashboard to check the number of orders, customers, products.<\/li>\n<li>Seller\/Admin have basic login and logout functionality.<\/li>\n<li>Buyer\/Customer have basic login, register and logout functionality.<\/li>\n<li>Buyer\/Customer can view the products.<\/li>\n<li>Buyer\/Customer can add the product into the cart.<\/li>\n<li>Buyer\/Customer can remove the product from the cart.<\/li>\n<li>Buyer\/Customer can change the quantity of products in the cart.<\/li>\n<li>Buyer\/Customer can order the product.<\/li>\n<li>Buyer\/Customer can view all product ordered history.<\/li>\n<\/ul>\n<h3>Project Prerequisites:<\/h3>\n<ul>\n<li>IDE Used: NetBeans 8.2. (you can also use Eclipse)<\/li>\n<li>Java should be installed on the machine.<\/li>\n<li>Database Used: MySQL 5.5.<\/li>\n<li>To build an online shopping system using java we require basic knowledge of java and also knowledge of the MySQL databases.<\/li>\n<li>Java provides the Servlet package for handling http requests and responses. Also, we need two more libraries such as Mysql-JDBC-connector and apache-commons-fileupload.<\/li>\n<\/ul>\n<h3>Download Online Shopping Project Java Code<\/h3>\n<p>Please download the java source code of online shopping project: <a href=\"https:\/\/drive.google.com\/file\/d\/1Pw4pBV3VAI62EJTQOj8TMjZEovpEzFPm\/view?usp=drive_link\"><strong>Online Shopping System Java Project Code<\/strong><\/a><\/p>\n<h2>Steps to Create Online Shopping Project in Java<\/h2>\n<p>These are the step to build Online Shopping System using java:<\/p>\n<p>1) Creating Database<br \/>\n2) Importing packages<br \/>\n3) System files structure<br \/>\n4) Functions used<br \/>\n5) Connection to database<br \/>\n6) Defining new customer registering servlet<br \/>\n7) Defining customer login servlet<br \/>\n8) Defining admin login servlet<br \/>\n9) Defining servlet for adding product in the database<br \/>\n10) Defining add to cart servlet<br \/>\n11) Defining servlet for customer to update product quantity in the cart<br \/>\n12) Defining servlet for admin to get current products status<\/p>\n<h3>1) Creating Database (MYSQL):<\/h3>\n<p>In this step, we basically create java online shopping system database.<\/p>\n<p>And also we create five tables:<\/p>\n<p>a) Admin table for storing information such as username, password, name and admin table is used for login purposes.<br \/>\nb) Cart table for storing information about the cart such as customer_id, quantity, product_id, etc.<br \/>\nc) Customer table for storing information such as username, password, name and customer table is used for login purposes.<br \/>\nd) Order table for storing information the customer has ordered the product from the website such as custiomer_id, product_id, payment_id, customer name, product name, total amount, quantity, address, etc.<br \/>\ne) Product table for storing information about the product such as product_name, id, image, price, mrp price, category, etc.<\/p>\n<h4>1) ADMIN TABLE: (tbladmin)<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">CREATE TABLE `tbladmin` (\r\n `id` bigint(20) NOT NULL AUTO_INCREMENT,\r\n `added_date` datetime NOT NULL,\r\n `email` varchar(100) NOT NULL,\r\n `password` varchar(100) NOT NULL,\r\n `name` varchar(100) NOT NULL,\r\n PRIMARY KEY (`id`)\r\n) ;\r\n<\/pre>\n<h4>2) CART TABLE: (tblcart)<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">CREATE TABLE `tblcart` (\r\n `id` bigint(20) NOT NULL AUTO_INCREMENT,\r\n `discount_price` varchar(200) DEFAULT NULL,\r\n `quantity` int(11) NOT NULL,\r\n `total_price` varchar(200) DEFAULT NULL,\r\n `customer_id` bigint(20) NOT NULL,\r\n `product_id` bigint(20) NOT NULL,\r\n `mrp_price` varchar(200) DEFAULT NULL,\r\n PRIMARY KEY (`id`)\r\n) ;\r\n<\/pre>\n<h4>3) CUSTOMER TABLE: (tblcustomer):<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">CREATE TABLE `tblcustomer` (\r\n `id` int(11) NOT NULL AUTO_INCREMENT,\r\n `address` varchar(255) NOT NULL,\r\n `added_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,\r\n `email` varchar(100) NOT NULL,\r\n `gender` varchar(6) NOT NULL,\r\n `name` varchar(50) NOT NULL,\r\n `password` varchar(60) NOT NULL,\r\n `phone` varchar(200) NOT NULL,\r\n `pin_code` varchar(255) NOT NULL,\r\n PRIMARY KEY (`id`)\r\n) ;\r\n<\/pre>\n<h4>4) ORDERS TABLE: (tblorders)<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">CREATE TABLE `tblorders` (\r\n `id` int(11) NOT NULL AUTO_INCREMENT,\r\n `order_no` int(11) DEFAULT NULL,\r\n `customer_name` varchar(200) DEFAULT NULL,\r\n `mobile_number` varchar(100) DEFAULT NULL,\r\n `email_id` varchar(100) DEFAULT NULL,\r\n `address` varchar(400) DEFAULT NULL,\r\n `address_type` varchar(100) DEFAULT NULL,\r\n `pincode` varchar(100) DEFAULT NULL,\r\n `image` varchar(200) DEFAULT NULL,\r\n `product_name` varchar(400) DEFAULT NULL,\r\n `quantity` int(11) DEFAULT NULL,\r\n `product_price` varchar(100) DEFAULT NULL,\r\n `product_selling_price` varchar(100) DEFAULT NULL,\r\n `product_total_price` varchar(100) DEFAULT NULL,\r\n `order_status` varchar(100) DEFAULT NULL,\r\n `order_date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,\r\n `payment_mode` varchar(100) DEFAULT NULL,\r\n `payment_id` int(11) DEFAULT NULL,\r\n PRIMARY KEY (`id`)\r\n) ;\r\n<\/pre>\n<h4>5) PRODUCT TABLE: (tblproduct)<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">CREATE TABLE `tblproduct` (\r\n `id` bigint(20) NOT NULL AUTO_INCREMENT,\r\n `active` varchar(100) DEFAULT NULL,\r\n `code` varchar(5) DEFAULT NULL,\r\n `create_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,\r\n `description` varchar(255) DEFAULT NULL,\r\n `image` varchar(100) DEFAULT NULL,\r\n `image_name` varchar(400) DEFAULT NULL,\r\n `name` varchar(30) DEFAULT NULL,\r\n `price` varchar(200) DEFAULT NULL,\r\n `mrp_price` varchar(200) DEFAULT NULL,\r\n `product_category` varchar(100) DEFAULT NULL,\r\n PRIMARY KEY (`id`)\r\n) ;\r\n<\/pre>\n<h4>6) INSERTING VALUE FOR ADMIN:<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">INSERT INTO tbladmin(email,password,name) VALUES('admin@gmail.com','admin','DataFlair');\r\n<\/pre>\n<h3>2) Importing packages<\/h3>\n<p>By default, Servlet packages are installed by JAVA (J2EE).<\/p>\n<p>But, mysql-connector library and apache-commons-fileupload we have to download from the internet and import into our project.<\/p>\n<p><a href=\"http:\/\/www.java2s.com\/Code\/JarDownload\/mysql\/mysql-connector.jar.zip\">Download mysql-connector library<\/a> for online shopping system<\/p>\n<p><a href=\"http:\/\/www.java2s.com\/Code\/JarDownload\/commons-fileupload\/commons-fileupload-1.3.jar.zip\">Download apache-commons-fileupload library<\/a><\/p>\n<p><strong>How to import them?<\/strong><\/p>\n<p>a) Click on Tools &gt; Libraries<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/add-library.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-98190\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/add-library.png\" alt=\"add library\" width=\"1920\" height=\"1010\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/add-library.png 1920w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/add-library-768x404.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/add-library-1536x808.png 1536w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/add-library-720x379.png 720w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/add-library-520x274.png 520w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/add-library-320x168.png 320w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/a><\/p>\n<p>b) At bottom left Click on \u201cNew Library\u201d<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/new-library.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-98191\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/new-library.png\" alt=\"new library\" width=\"1920\" height=\"1010\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/new-library.png 1920w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/new-library-768x404.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/new-library-1536x808.png 1536w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/new-library-720x379.png 720w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/new-library-520x274.png 520w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/new-library-320x168.png 320w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/a><\/p>\n<p>Name your library and click on \u201cOK\u201d.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/create-new-lib.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-98192\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/create-new-lib.png\" alt=\"create new lib\" width=\"1920\" height=\"1010\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/create-new-lib.png 1920w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/create-new-lib-768x404.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/create-new-lib-1536x808.png 1536w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/create-new-lib-720x379.png 720w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/create-new-lib-520x274.png 520w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/create-new-lib-320x168.png 320w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/a><\/p>\n<p>Now Click on Add JAR\/Folder and select the downloaded file to add in online shopping java project and click on \u201cok\u201d.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/add-jar-in-java-project.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-98193\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/add-jar-in-java-project.png\" alt=\"add jar in java project\" width=\"1920\" height=\"1010\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/add-jar-in-java-project.png 1920w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/add-jar-in-java-project-768x404.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/add-jar-in-java-project-1536x808.png 1536w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/add-jar-in-java-project-720x379.png 720w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/add-jar-in-java-project-520x274.png 520w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/add-jar-in-java-project-320x168.png 320w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/a><\/p>\n<p>Now, add that library on in your project.<\/p>\n<h3>3) Project Structure:<\/h3>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/online-shopping-project-structure.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-98194\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/online-shopping-project-structure.png\" alt=\"online shopping project structure\" width=\"334\" height=\"775\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/online-shopping-project-structure.png 334w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/online-shopping-project-structure-320x743.png 320w\" sizes=\"auto, (max-width: 334px) 100vw, 334px\" \/><\/a><\/p>\n<p><strong>Files Description:<\/strong><\/p>\n<p>a) Admin-add-products.jsp: It is used by admin to add new products in the database of the system.<br \/>\nb) Admin-all-orders.jsp: It is used by admin to view all orders from the database of the system.<br \/>\nc) Admin-delete-product.jsp: It is used by admin to delete any specific product from the database of the system.<br \/>\nd) Admin-delivered-products.jsp: It is used by admin to mark the products as delivered which were pending in the system.<br \/>\ne) Admin-edit-product-process.jsp: It is used by admin to update the details of specific products in the database of the system.<br \/>\nf) Admin-edit-product.jsp: It takes input from the admin to update the specific product and after that process is handled by the Admin-edit-product-process.jsp<br \/>\ng) Admin-login.jsp: It checks the authentication of the admin and redirected to the dashboard.jsp page<br \/>\nh) Admin-logout.jsp: It logouts the admin from the session and sends it back to the admin-login.jsp page.<br \/>\ni) Admin-pending-orders.jsp: It is used by admin to view all pending orders from the database of the system.<br \/>\nj) Admin-view-customers.jsp: It is used by admin to view all customers from the database of the system.<br \/>\nk) Admin-view-product.jsp: It is used by admin to view all products from the database of the system.<br \/>\nl) AdminHeader.jsp: This page contains a navigation bar for the admin\/seller dashboard in java online shopping project.<br \/>\nm) Checkout.jsp: This page is used by the customer when it checks out his\/her orders, all the order entries made in the database of the system.<br \/>\nn) Customer-login.jsp: It checks the authentication of the customer and redirected to the index.jsp page<br \/>\no) Customer-register.jsp: This page is used by the customer to register the new customer\/user.<br \/>\np) Dashboard.jsp: This page is used by the admin to display all the counts of the customers, products, orders.<br \/>\nq) Footer.jsp: This is a common page that includes footer and used by all the jsp pages in java online shopping system.<br \/>\nr) Header.jsp: This page contains a navigation bar for the customer\/user dashboard.<br \/>\ns) Index.jsp: This is a main display page that includes all products.<br \/>\nt) Logout.jsp: It logouts the user\/customer from the session and sends it back to the index.jsp page.<br \/>\nu) My-orders.jsp: This page is used by customers and it contains all the order history of the customer.<br \/>\nv) Products.jsp: This is a display page that includes all products and their descriptions.<br \/>\nw) RemoveProductFromTheCart.jsp: This is used by the customer and it removes specific products from the cart provided by the customer.<\/p>\n<h3>4) Functions Used:<\/h3>\n<p><strong>a) getParameter(\u201cname\u201d):<\/strong> This function will return the value of the name object of the input of the client.<br \/>\n<strong>b) getSession():<\/strong> This function will return the current session object. If the parameter is true, then it will create a new session in java online shopping project.<br \/>\n<strong>c) getAttribute(\u201cobject_name\u201d):<\/strong> This function will return the stored value of a specified object from the session.<br \/>\n<strong>d) setAttribute(&#8220;object_name&#8221;,object_value):<\/strong> This function will take the parameters as key and value and store it inside the session.<br \/>\n<strong>e)sendRedirect(\u201cname_of_the_page\u201d):<\/strong> This function will redirect the current page to the specified page. The specified page can be html or jsp format.<br \/>\n<strong>f) invalidate():<\/strong> This function will invalidate the session. It is used to clear current session values and also for logout.<\/p>\n<h3>5) Connection to Database:<\/h3>\n<p>In this step, we will create a universal connection method as a reusable method for java online shopping system project project, this method will connect to MySQL database. Make sure that you enter the proper url string of database connection such as port number, username, password, etc.<\/p>\n<p><strong>Function definitions:<\/strong><\/p>\n<p><strong>a) forName(driverClassName):<\/strong> This function is used to register with the driver of the database.<br \/>\n<strong>b) getConnection(url):<\/strong> This function is used to make connections with databases. It takes parameters such as hostname, port number, database, username, password, etc. Generalized form: &#8220;jdbc:mysql:\/\/hostname:port\/dbName&#8221;, &#8220;username&#8221;, &#8220;password&#8221;. If your mysql does not have a password then enter \u201c\u201d as an empty string.<br \/>\n<strong>c) close():<\/strong> This function will close the connection of mysql database. This function is important to clean the garbage values and to make an optimized system.<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">package com.connection;\r\n\r\nimport java.sql.Connection;\r\nimport java.sql.DriverManager;\r\nimport java.sql.ResultSet;\r\nimport java.sql.SQLException;\r\n\r\npublic class DatabaseConnection {\r\n\r\n    \/\/Creating database Connection in java online shopping system\r\n    public static Connection connection;\r\n\r\n    \/\/Creating universal method to open connect will mysql database\r\n    public static Connection getConnection() {\r\n        try {\r\n            \/\/Registering with mysql Driver\r\n            Class.forName(\"com.mysql.jdbc.Driver\");\r\n            connection = DriverManager.getConnection(\"jdbc:mysql:\/\/localhost:3306\/shoppingsystem\", \"root\", \"yourpassword\");\r\n        } catch (Exception e) {\r\n            e.printStackTrace();\r\n        }\r\n        return (connection);\r\n    }\r\n\r\n    \/\/Creating universal method to close connect will mysql database\r\n    public static void CloseConnection() {\r\n        if (connection != null) {\r\n            try {\r\n                connection.close();\r\n                connection = null;\r\n            } catch (SQLException ex) {\r\n                ex.printStackTrace();\r\n            }\r\n        }\r\n    }\r\n\r\n    \/\/Creating universal method to query for retrieving information\r\n    public static ResultSet getResultFromSqlQuery(String SqlQueryString) {\r\n        \/\/Creating Resultset object\r\n        ResultSet rs = null;\r\n        try {\r\n            \/\/Checking whether the connection is null or null\r\n            if (connection == null) {\r\n                getConnection();\r\n            }\r\n            \/\/Querying the query\r\n            rs = connection.createStatement().executeQuery(SqlQueryString);\r\n        } catch (Exception ex) {\r\n            ex.printStackTrace();\r\n        }\r\n        return rs;\r\n    }\r\n\r\n    \/\/Creating universal method to query for inserting or updating information in mysql database\r\n    public static int insertUpdateFromSqlQuery(String SqlQueryString) {\r\n        int i = 2;\r\n        try {\r\n            \/\/Checking whether the connection is null or null\r\n            if (connection == null) {\r\n                getConnection();\r\n            }\r\n            \/\/Querying the query\r\n            i = connection.createStatement().executeUpdate(SqlQueryString);\r\n\r\n        } catch (Exception ex) {\r\n            ex.printStackTrace();\r\n        }\r\n        return i;\r\n    }\r\n}\r\n<\/pre>\n<h3>6) Defining new customer registering servlet<\/h3>\n<p>In this step of online shopping system, we will take the values from the frontend (customer-register.jsp) values and insert into our tblcustomer table and if data entered successfully then we will send a response that you have been registered successfully and redirecting to the customer-login.jsp page.<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">import java.io.IOException;\r\n\r\nimport javax.servlet.ServletException;\r\nimport javax.servlet.annotation.WebServlet;\r\nimport javax.servlet.http.HttpServlet;\r\nimport javax.servlet.http.HttpServletRequest;\r\nimport javax.servlet.http.HttpServletResponse;\r\nimport javax.servlet.http.HttpSession;\r\n\r\nimport com.connection.DatabaseConnection;\r\n\r\n@WebServlet(\"\/AddCustomer\")\r\npublic class AddCustomer extends HttpServlet {\r\n\r\n    protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n            throws ServletException, IOException {\r\n\r\n        \/\/Retrieving values from the frontend\r\n        String name = request.getParameter(\"name\");\r\n        String email = request.getParameter(\"email\");\r\n        String password = request.getParameter(\"password\");\r\n        String mobile = request.getParameter(\"mobile\");\r\n        String gender = request.getParameter(\"gender\");\r\n        String address = request.getParameter(\"address\");\r\n        String pincode = request.getParameter(\"pincode\");\r\n        \r\n        \/\/Creating Session\r\n        HttpSession hs = request.getSession();\r\n        \r\n        \/\/Inserting all values inside the database\r\n        try {\r\n            \/\/Connecting database connection and querying in the database\r\n            int addCustomer = DatabaseConnection.insertUpdateFromSqlQuery(\"insert into tblcustomer(address,email,gender,name,password,phone,pin_code)values('\" + address + \"','\" + email + \"','\" + gender + \"','\" + name + \"','\" + password + \"','\"\r\n                    + mobile + \"','\" + pincode + \"')\");\r\n            \r\n            \/\/If customer registered successfully in java online shopping system\r\n            if (addCustomer &gt; 0) {\r\n                String message = \"Customer register successfully.\";\r\n                \/\/Passing message via session.\r\n                hs.setAttribute(\"success-message\", message);\r\n                \/\/Sending response back to the user\/customer\r\n                response.sendRedirect(\"customer-register.jsp\");\r\n            } else {\r\n                 \/\/If customer fails to register \r\n                String message = \"Customer registration fail\";\r\n                \/\/Passing message via session.\r\n                hs.setAttribute(\"fail-message\", message);\r\n                \/\/Sending response back to the user\/customer\r\n                response.sendRedirect(\"customer-register.jsp\");\r\n            }\r\n        } catch (Exception ex) {\r\n            ex.printStackTrace();\r\n        }\r\n    }\r\n}\r\n<\/pre>\n<h3>7) Defining customer login servlet:<\/h3>\n<p>In this step, we will take the values from the frontend (customer-login.jsp) values and check credentials via database. If credentials are correct then user\/customer will be redirected to index.jsp page else customer-login.jsp page.<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">import java.io.IOException;\r\nimport java.sql.ResultSet;\r\nimport javax.servlet.ServletException;\r\nimport javax.servlet.annotation.WebServlet;\r\nimport javax.servlet.http.HttpServlet;\r\nimport javax.servlet.http.HttpServletRequest;\r\nimport javax.servlet.http.HttpServletResponse;\r\nimport javax.servlet.http.HttpSession;\r\n\r\nimport com.connection.DatabaseConnection;\r\n\r\n@WebServlet(\"\/CustomerLogin\")\r\npublic class CustomerLogin extends HttpServlet {\r\n\r\n    protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n            throws ServletException, IOException {\r\n\r\n        \/\/Getting all data from user\/customer\r\n        String email = request.getParameter(\"email\");\r\n        String password = request.getParameter(\"password\");\r\n        \/\/Creating Session\r\n        HttpSession hs = request.getSession();\r\n        try {\r\n            \/\/Creating Resultset\r\n            ResultSet resultset = null;\r\n            \/\/Query to check Login Details\r\n            resultset = DatabaseConnection.getResultFromSqlQuery(\"select * from tblcustomer where email='\" + email + \"' and password='\" + password + \"'\");\r\n            \/\/Checking whether the details of user are null or not\r\n            if (email != null &amp;&amp; password != null) {\r\n                if (resultset.next()) {\r\n                    \/\/Storing the login details in session\r\n                    hs.setAttribute(\"id\", resultset.getInt(\"id\"));\r\n                    hs.setAttribute(\"name\", resultset.getString(\"name\"));\r\n                    \/\/Redirecting response to the index.jsp\r\n                    response.sendRedirect(\"index.jsp\");\r\n                } else {\r\n                    \/\/If wrong credentials are entered in java online shopping system\r\n                    String message = \"You have enter wrong credentials\";\r\n                    hs.setAttribute(\"credential\", message);\r\n                    \/\/Redirecting response to the customer-login.jsp\r\n                    response.sendRedirect(\"customer-login.jsp\");\r\n                }\r\n            } else {\r\n                \/\/If username or password is empty or null\r\n                String message = \"User name or Password is null\";\r\n                hs.setAttribute(\"credential\", message);\r\n                \/\/Redirecting response to the customer-login.jsp\r\n                response.sendRedirect(\"customer-login.jsp\");\r\n            }\r\n\r\n        } catch (Exception e) {\r\n            e.printStackTrace();\r\n        }\r\n    }\r\n}\r\n<\/pre>\n<h4>8) Defining admin login servlet<\/h4>\n<p>In this step, we will take the values from the frontend (admin-login.jsp) values and check credentials via database. If credentials are correct then admin\/seller will be redirected to dashboard.jsp page else admin-login.jsp page in online shopping project.<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">import java.io.IOException;\r\nimport java.sql.Connection;\r\nimport java.sql.ResultSet;\r\nimport java.sql.Statement;\r\n\r\nimport javax.servlet.ServletException;\r\nimport javax.servlet.annotation.WebServlet;\r\nimport javax.servlet.http.HttpServlet;\r\nimport javax.servlet.http.HttpServletRequest;\r\nimport javax.servlet.http.HttpServletResponse;\r\nimport javax.servlet.http.HttpSession;\r\n\r\nimport com.connection.DatabaseConnection;\r\n\r\n@WebServlet(\"\/AdminLogin\")\r\npublic class AdminLogin extends HttpServlet {\r\n\r\n    protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n            throws ServletException, IOException {\r\n        try {\r\n            \/\/Getting all the parameters from the frontend (admin)\r\n            String email = request.getParameter(\"email\");\r\n            String pass = request.getParameter(\"upass\");\r\n\r\n            \/\/Retriving our session\r\n            HttpSession hs = request.getSession();\r\n\r\n            \/\/Calling Connection method\r\n            Connection con = DatabaseConnection.getConnection();\r\n\r\n            \/\/Creating Statement\r\n            Statement st = con.createStatement();\r\n\r\n            \/\/Querying inside the database\r\n            ResultSet resultset = st.executeQuery(\"select * from tbladmin where email='\" + email + \"' AND password='\" + pass + \"'\");\r\n            \/\/If all the details are correct\r\n            if (resultset.next()) {\r\n                hs.setAttribute(\"uname\", resultset.getString(\"name\"));\r\n                \/\/Redirecting admin to dashboard page\r\n                response.sendRedirect(\"dashboard.jsp\");\r\n\r\n            } else {\r\n                \/\/If details are wrong\r\n                String message = \"You have enter wrong credentials\";\r\n                hs.setAttribute(\"credential\", message);\r\n                \/\/Redirecting admin to admin login page\r\n                response.sendRedirect(\"admin-login.jsp\");\r\n            }\r\n        } catch (Exception e) {\r\n            System.out.println(e);\r\n        }\r\n    }\r\n}\r\n<\/pre>\n<h3>9) Defining servlet for adding product in the database<\/h3>\n<p>In this step of online shopping project, we will take all the parameters\/inputs from the frontend (admin) and all the inputs of the new product such as image, category, product name, price, etc will be saved to the database.<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">import java.io.File;\r\nimport java.io.IOException;\r\nimport java.util.List;\r\nimport java.util.Random;\r\n\r\nimport javax.servlet.ServletException;\r\nimport javax.servlet.annotation.WebServlet;\r\nimport javax.servlet.http.HttpServlet;\r\nimport javax.servlet.http.HttpServletRequest;\r\nimport javax.servlet.http.HttpServletResponse;\r\nimport javax.servlet.http.HttpSession;\r\n\r\nimport org.apache.commons.fileupload.FileItem;\r\nimport org.apache.commons.fileupload.disk.DiskFileItemFactory;\r\nimport org.apache.commons.fileupload.servlet.ServletFileUpload;\r\n\r\nimport com.connection.DatabaseConnection;\r\n\r\n@WebServlet(\"\/AddProducts\")\r\npublic class AddProducts extends HttpServlet {\r\n\r\n    \/\/Path where all the images are stored\r\n    private final String UPLOAD_DIRECTORY = \"ENTER_YOUR_DIRECTORY_PATH\";\r\n\r\n    @Override\r\n    protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n            throws ServletException, IOException {\r\n\r\n        \/\/Creating session in java online shopping project\r\n        HttpSession session = request.getSession();\r\n        if (ServletFileUpload.isMultipartContent(request)) {\r\n            try {\r\n                \/\/Taking all image requests\r\n                List&lt;FileItem&gt; multiparts = new ServletFileUpload(new DiskFileItemFactory()).parseRequest(request);\r\n                String imageName = null;\r\n                String productName = null;\r\n                String productQuantity = null;\r\n                String productPrice = null;\r\n                String descrip = null;\r\n                String mrpPrice = null;\r\n                String status = null;\r\n                String category = null;\r\n\r\n                \/\/SALTCHARS to generate unique code for product\r\n                String SALTCHARS = \"ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890\";\r\n                StringBuilder salt = new StringBuilder();\r\n                Random rnd = new Random();\r\n                while (salt.length() &lt; 3) { \/\/ length of the random string.\r\n                    int index = (int) (rnd.nextFloat() * SALTCHARS.length());\r\n                    salt.append(SALTCHARS.charAt(index));\r\n                }\r\n                String code = salt.toString();\r\n\r\n                for (FileItem item : multiparts) {\r\n                    if (!item.isFormField()) {\r\n                        \/\/Getting image name\r\n                        imageName = new File(item.getName()).getName();\r\n                        \/\/Storing in the specified directory\r\n                        item.write(new File(UPLOAD_DIRECTORY + File.separator + imageName));\r\n\r\n                        \/\/Retrieving all information from frontend of online shopping system\r\n                        FileItem pName = (FileItem) multiparts.get(0);\r\n                        productName = pName.getString();\r\n\r\n                        FileItem price = (FileItem) multiparts.get(1);\r\n                        productPrice = price.getString();\r\n\r\n                        FileItem description = (FileItem) multiparts.get(2);\r\n                        descrip = description.getString();\r\n\r\n                        FileItem mprice = (FileItem) multiparts.get(3);\r\n                        mrpPrice = mprice.getString();\r\n\r\n                        FileItem fstatus = (FileItem) multiparts.get(4);\r\n                        status = fstatus.getString();\r\n\r\n                        FileItem pcategory = (FileItem) multiparts.get(5);\r\n                        category = pcategory.getString();\r\n\r\n                    }\r\n                }\r\n                try {\r\n                    int id = 0;\r\n                    String imagePath = UPLOAD_DIRECTORY + imageName;\r\n                    \/\/Querying to insert product in the table\r\n                    int i = DatabaseConnection.insertUpdateFromSqlQuery(\"insert into tblproduct(id,active,code,description,image,image_name,name,price,mrp_price,product_category) values('\" + id + \"','\" + status + \"','\" + code + \"','\" + descrip + \"','\" + imagePath + \"','\" + imageName + \"','\" + productName + \"','\" + productPrice + \"','\" + mrpPrice + \"','\" + category + \"')\");\r\n                    \/\/If product inserted successfully in the database\r\n                    if (i &gt; 0) {\r\n                        String success = \"Product added successfully.\";\r\n                        \/\/Adding method in session.\r\n                        session.setAttribute(\"message\", success);\r\n                        \/\/Response send to the admin-add-product.jsp\r\n                        response.sendRedirect(\"admin-add-product.jsp\");\r\n                    }\r\n                } catch (Exception e) {\r\n                    e.printStackTrace();\r\n                }\r\n            } catch (Exception ex) {\r\n                \/\/If any error occurred while uploading product image\r\n                request.setAttribute(\"message\", \"File Upload Failed due to \" + ex);\r\n            }\r\n        } else {\r\n            request.setAttribute(\"message\", \"Sorry this Servlet only handles file upload request\");\r\n        }\r\n    }\r\n}\r\n<\/pre>\n<h3>10) Defining add to cart servlet<\/h3>\n<p>In this section, we will take products (product_id) as input from the user\/customer which he\/she wants to add the product into the cart of online shopping system. The products which are added in the cart by the user, their details will be added in the table tblcart.<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">import java.io.IOException;\r\nimport javax.servlet.ServletException;\r\nimport javax.servlet.annotation.WebServlet;\r\nimport javax.servlet.http.HttpServlet;\r\nimport javax.servlet.http.HttpServletRequest;\r\nimport javax.servlet.http.HttpServletResponse;\r\nimport javax.servlet.http.HttpSession;\r\n\r\nimport com.connection.DatabaseConnection;\r\n\r\n@WebServlet(\"\/AddToCart\")\r\npublic class AddToCart extends HttpServlet {\r\n\r\n    @Override\r\n    protected void doPost(HttpServletRequest request, HttpServletResponse response)\r\n            throws ServletException, IOException {\r\n\r\n        int id = 0;\r\n\r\n        \/\/Getting all the parameters from the user\r\n        int productId = Integer.parseInt(request.getParameter(\"productId\"));\r\n        String price = request.getParameter(\"price\");\r\n        String mrp_price = request.getParameter(\"mrp_price\");\r\n        HttpSession hs = request.getSession();\r\n        try {\r\n            \/\/If user session is null user have to re-login\r\n            if ((String) hs.getAttribute(\"name\") == null) {\r\n                response.sendRedirect(\"customer-login.jsp\");\r\n                \/\/Inserting cart details to the database\r\n            } else {\r\n                int customerId = (int) hs.getAttribute(\"id\");\r\n                \/\/Querying to the database.\r\n                int addToCart = DatabaseConnection.insertUpdateFromSqlQuery(\"insert into tblcart values('\" + id + \"','\" + price + \"',1,'\" + price + \"','\" + customerId + \"','\" + productId + \"','\" + mrp_price + \"')\");\r\n                if (addToCart &gt; 0) {\r\n                    response.sendRedirect(\"index.jsp\");\r\n                }\r\n            }\r\n\r\n        } catch (Exception e) {\r\n            e.printStackTrace();\r\n        }\r\n    }\r\n}\r\n<\/pre>\n<h4>11) Defining servlet for customer to update product quantity in the cart<\/h4>\n<p>In this section, we will take products as input from user\/customer whenever user\/customer updates the quantity of product to the cart. The quantity of product details will be updated to the cart table. (tblcart)<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">import java.io.IOException;\r\nimport javax.servlet.ServletException;\r\nimport javax.servlet.annotation.WebServlet;\r\nimport javax.servlet.http.HttpServlet;\r\nimport javax.servlet.http.HttpServletRequest;\r\nimport javax.servlet.http.HttpServletResponse;\r\nimport javax.servlet.http.HttpSession;\r\nimport java.sql.*;\r\nimport com.connection.DatabaseConnection;\r\n\r\n@WebServlet(\"\/UpdateProductQuantity\")\r\npublic class UpdateProductQuantity extends HttpServlet {\r\n\r\n    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\r\n        \/\/Getting all the data from the user\/cutomer\r\n        int quantity = Integer.parseInt(request.getParameter(\"quantity\"));\r\n        int productId = Integer.parseInt(request.getParameter(\"productId\"));\r\n        HttpSession session = request.getSession();\r\n        String discount_price = null;\r\n        Double productPrice = 0.0;\r\n        try {\r\n            \/\/Querying to database\r\n            ResultSet rs = DatabaseConnection.getResultFromSqlQuery(\"select discount_price from tblcart where customer_id='\" + session.getAttribute(\"id\") + \"' and product_id='\" + productId + \"'\");\r\n            while (rs.next()) {\r\n                \/\/Getting data\r\n                discount_price = rs.getString(\"discount_price\");\r\n                \/\/Converting into double from string\r\n                productPrice = Double.parseDouble(discount_price);\r\n            }\r\n            productPrice = productPrice * quantity;\r\n            \/\/Update Query for updating product quantity\r\n            int updateQuantity = DatabaseConnection.insertUpdateFromSqlQuery(\"update tblcart set quantity='\" + quantity + \"',total_price='\" + productPrice + \"' where customer_id='\" + session.getAttribute(\"id\") + \"' and product_id='\" + productId + \"' \");\r\n            \/\/If cart of online shopping systemis sucessfully updated\r\n            if (updateQuantity &gt; 0) {\r\n                \/\/Sending response back to the user\/customer.\r\n                response.sendRedirect(\"checkout.jsp\");\r\n                \/\/If cart is not updated\r\n            } else {\r\n                 \/\/Sending response back to the user\/customer.\r\n                response.sendRedirect(\"checkout.jsp\");\r\n            }\r\n        } catch (Exception e) {\r\n            e.printStackTrace();\r\n        }\r\n    }\r\n}\r\n<\/pre>\n<h4>12) Defining servlet for admin to get current products status<\/h4>\n<p>In this section, admin will provide order id as input to the seller, and by using database servlet will send responses such as ordered completed, pending order, etc.<\/p>\n<p><strong>Code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">import com.connection.DatabaseConnection;\r\nimport java.io.IOException;\r\nimport java.sql.ResultSet;\r\n\r\nimport javax.servlet.ServletException;\r\nimport javax.servlet.annotation.WebServlet;\r\nimport javax.servlet.http.HttpServlet;\r\nimport javax.servlet.http.HttpServletRequest;\r\nimport javax.servlet.http.HttpServletResponse;\r\n\r\n\r\n@WebServlet(\"\/CustomerProductsOrderStatus\")\r\npublic class CustomerProductsOrderStatus extends HttpServlet {\r\n\r\n    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\r\n        try {\r\n            int statusMode = 0;\r\n            \/\/Taking input from admin order-id to get the order status from the database of online shopping system in Java\r\n            ResultSet rs = DatabaseConnection.getResultFromSqlQuery(\"select order_status from tblorders where order_no='\" + request.getParameter(\"orderId\") + \"'\");\r\n            while (rs.next()) {\r\n                if (rs.getString(1).equals(\"Deliver\")) {\r\n                    statusMode = DatabaseConnection.insertUpdateFromSqlQuery(\"update tblorders set order_status='Pending' where order_no='\" + request.getParameter(\"orderId\") + \"'\");\r\n                } else {\r\n                    statusMode = DatabaseConnection.insertUpdateFromSqlQuery(\"update tblorders set order_status='Deliver' where order_no='\" + request.getParameter(\"orderId\") + \"'\");\r\n                }\r\n            }\r\n            if (statusMode &gt; 0) {\r\n                \/\/Sending response back to admin-all-orders.jsp page when sql query executed successfully\r\n                response.sendRedirect(\"admin-all-orders.jsp\");\r\n            } else {\r\n                \/\/Sending response back to admin-all-orders.jsp page\r\n                response.sendRedirect(\"admin-all-orders.jsp\");\r\n            }\r\n        } catch (Exception e) {\r\n            e.printStackTrace();\r\n        }\r\n    }\r\n\r\n}\r\n<\/pre>\n<h3>Java Online Shopping System Output<\/h3>\n<p>a) Home Screen:<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/java-online-shopping-system-output.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-98195\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/java-online-shopping-system-output.png\" alt=\"java online shopping system output\" width=\"1920\" height=\"949\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/java-online-shopping-system-output.png 1920w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/java-online-shopping-system-output-768x380.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/java-online-shopping-system-output-1536x759.png 1536w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/java-online-shopping-system-output-720x356.png 720w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/java-online-shopping-system-output-520x257.png 520w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/java-online-shopping-system-output-320x158.png 320w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/a><\/p>\n<p>b) Admin Login:<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/admin-login.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-98196\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/admin-login.png\" alt=\"admin login\" width=\"1920\" height=\"949\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/admin-login.png 1920w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/admin-login-768x380.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/admin-login-1536x759.png 1536w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/admin-login-720x356.png 720w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/admin-login-520x257.png 520w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/admin-login-320x158.png 320w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/a><\/p>\n<p>c) Admin Add Product:<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/admin-add-products-in-online-shopping-system.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-98197\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/admin-add-products-in-online-shopping-system.png\" alt=\"admin add products in online shopping system\" width=\"1920\" height=\"949\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/admin-add-products-in-online-shopping-system.png 1920w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/admin-add-products-in-online-shopping-system-768x380.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/admin-add-products-in-online-shopping-system-1536x759.png 1536w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/admin-add-products-in-online-shopping-system-720x356.png 720w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/admin-add-products-in-online-shopping-system-520x257.png 520w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/admin-add-products-in-online-shopping-system-320x158.png 320w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/a><\/p>\n<p>d) Customer New Registration (Sign-Up):<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/online-shopping-customer-registration.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-98198\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/online-shopping-customer-registration.png\" alt=\"online shopping customer registration\" width=\"1920\" height=\"949\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/online-shopping-customer-registration.png 1920w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/online-shopping-customer-registration-768x380.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/online-shopping-customer-registration-1536x759.png 1536w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/online-shopping-customer-registration-720x356.png 720w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/online-shopping-customer-registration-520x257.png 520w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/online-shopping-customer-registration-320x158.png 320w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/a><\/p>\n<p>e) Adding product to cart, you can also modify the quantity of product, can also delete the product<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/cart.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-98199\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/cart.png\" alt=\"cart\" width=\"1920\" height=\"949\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/cart.png 1920w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/cart-768x380.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/cart-1536x759.png 1536w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/cart-720x356.png 720w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/cart-520x257.png 520w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/cart-320x158.png 320w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/a><\/p>\n<p>f) Shopping Admin View Orders:<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/view-orders.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-98200\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/view-orders.png\" alt=\"view orders\" width=\"1920\" height=\"949\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/view-orders.png 1920w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/view-orders-768x380.png 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/view-orders-1536x759.png 1536w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/view-orders-720x356.png 720w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/view-orders-520x257.png 520w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/view-orders-320x158.png 320w\" sizes=\"auto, (max-width: 1920px) 100vw, 1920px\" \/><\/a><\/p>\n<h2>Java Online Shopping System &#8211; Summary<\/h2>\n<p>Yayy! We have finally built our Online Shopping System using java and mysql. Now Seller\/Admin can add products, edit products, view products, delete products, view orders, view customers. Customers\/Users can view products, add the products in the cart, buy the products. From this project we have learned how we can connect a mysql database with java servlet, and also how to query a database via java.<span hidden class=\"__iawmlf-post-loop-links\" data-iawmlf-links=\"[{&quot;id&quot;:2617,&quot;href&quot;:&quot;https:\\\/\\\/drive.google.com\\\/file\\\/d\\\/1Pw4pBV3VAI62EJTQOj8TMjZEovpEzFPm\\\/view?usp=drive_link&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20260601085457\\\/https:\\\/\\\/drive.google.com\\\/file\\\/d\\\/1Pw4pBV3VAI62EJTQOj8TMjZEovpEzFPm\\\/view?usp=drive_link&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2026-06-02 08:39:30&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-09 02:35:40&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-13 19:33:08&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-17 01:41:41&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-20 05:43:09&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-06-23 20:21:03&quot;,&quot;http_code&quot;:200}],&quot;broken&quot;:false,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-06-23 20:21:03&quot;,&quot;http_code&quot;:200},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:344,&quot;href&quot;:&quot;http:\\\/\\\/www.java2s.com\\\/Code\\\/JarDownload\\\/mysql\\\/mysql-connector.jar.zip&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20240416031430\\\/http:\\\/\\\/www.java2s.com\\\/Code\\\/JarDownload\\\/mysql\\\/mysql-connector.jar.zip&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2025-12-08 07:49:02&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2025-12-11 09:24:50&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2025-12-15 15:45:59&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2025-12-20 07:41:11&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2025-12-23 13:01:21&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2025-12-26 14:05:02&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2025-12-30 10:24:09&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-01-02 18:24:42&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-01-11 04:51:22&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-01-15 14:45:41&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-01-19 00:55:48&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-01-22 05:01:20&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-01-28 08:39:57&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-01-31 11:46:58&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-02-04 13:54:22&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-02-08 12:15:54&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-02-12 02:46:07&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-02-17 10:24:57&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-02-24 05:17:43&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-02-27 11:44:44&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-03-02 23:33:19&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-03-06 09:38:21&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-03-10 08:42:19&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-03-14 21:15:05&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-03-18 11:38:42&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-22 00:58:23&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-25 05:31:36&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-28 10:46:59&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-31 12:48:34&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-04 06:57:04&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-08 02:16:24&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-11 04:33:27&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-14 08:22:55&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-17 08:48:55&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-21 17:21:46&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-24 21:17:48&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-04-28 05:09:23&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-05-01 16:20:36&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-05-05 04:01:40&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-05-08 12:40:10&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-05-12 05:20:21&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-05-15 09:34:20&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-05-19 13:44:21&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-05-24 18:55:32&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-05-28 02:57:49&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-05-31 12:11:52&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-06-04 02:00:50&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-06-09 02:35:50&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-06-13 19:33:26&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-06-17 01:41:53&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-06-20 05:43:25&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-06-23 20:21:10&quot;,&quot;http_code&quot;:404}],&quot;broken&quot;:true,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-06-23 20:21:10&quot;,&quot;http_code&quot;:404},&quot;process&quot;:&quot;done&quot;},{&quot;id&quot;:345,&quot;href&quot;:&quot;http:\\\/\\\/www.java2s.com\\\/Code\\\/JarDownload\\\/commons-fileupload\\\/commons-fileupload-1.3.jar.zip&quot;,&quot;archived_href&quot;:&quot;http:\\\/\\\/web-wp.archive.org\\\/web\\\/20210114210456\\\/http:\\\/\\\/www.java2s.com\\\/Code\\\/JarDownload\\\/commons-fileupload\\\/commons-fileupload-1.3.jar.zip&quot;,&quot;redirect_href&quot;:&quot;&quot;,&quot;checks&quot;:[{&quot;date&quot;:&quot;2025-12-08 07:49:05&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2025-12-11 09:24:50&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2025-12-15 15:45:59&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2025-12-20 07:41:11&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2025-12-23 13:01:21&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2025-12-26 14:05:02&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2025-12-30 10:24:09&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-01-02 18:24:42&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-01-10 10:01:06&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-01-13 16:36:58&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-01-19 00:55:48&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-01-22 02:35:19&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-01-26 11:02:05&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-01-30 08:07:52&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-02-03 08:33:02&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-02-06 10:37:49&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-02-09 16:18:24&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-02-13 06:36:03&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-02-17 10:25:07&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-02-22 08:33:50&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-02-25 18:21:03&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-03-02 02:40:08&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-03-05 07:59:37&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-03-10 08:42:19&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-03-15 14:15:41&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-03-20 16:05:39&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-24 06:05:25&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-28 10:46:59&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-03-31 12:48:34&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-04 06:57:04&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-08 02:16:24&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-11 04:33:27&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-14 08:22:55&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-17 08:48:55&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-21 17:21:46&quot;,&quot;http_code&quot;:200},{&quot;date&quot;:&quot;2026-04-24 21:17:48&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-04-28 05:09:23&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-05-01 16:20:36&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-05-05 04:01:39&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-05-08 12:40:10&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-05-12 05:20:24&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-05-15 09:34:20&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-05-19 13:44:21&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-05-24 18:55:33&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-05-28 02:57:49&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-05-31 12:11:52&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-06-04 02:00:48&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-06-09 02:35:51&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-06-13 19:33:26&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-06-17 01:41:51&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-06-20 05:43:25&quot;,&quot;http_code&quot;:404},{&quot;date&quot;:&quot;2026-06-23 20:21:09&quot;,&quot;http_code&quot;:404}],&quot;broken&quot;:true,&quot;last_checked&quot;:{&quot;date&quot;:&quot;2026-06-23 20:21:09&quot;,&quot;http_code&quot;:404},&quot;process&quot;:&quot;done&quot;}]\"><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The Online Shopping System has become an essential tool for sellers and also for buyers. The online shopping system in java allows buyers to buy goods\/products directly from the seller website and it saves&#46;&#46;&#46;<\/p>\n","protected":false},"author":5,"featured_media":98201,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[32],"tags":[24759,24761,24758,22479,24760],"class_list":["post-98185","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-java","tag-advance-java-project","tag-java-ecommerce-project","tag-java-online-shopping-system","tag-java-project","tag-online-shopping-project"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Online Shopping System in Java using JSPs &amp; Servlets - DataFlair<\/title>\n<meta name=\"description\" content=\"Create online shopping system in Java using JSPs, Servlets and MySQL. Users can view, buy products and admins can add, edit, sell products\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/online-shopping-system-java-jsp-servlets\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Online Shopping System in Java using JSPs &amp; Servlets - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Create online shopping system in Java using JSPs, Servlets and MySQL. Users can view, buy products and admins can add, edit, sell products\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/online-shopping-system-java-jsp-servlets\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-13T03:30:11+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2026-06-01T08:53:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/online-shopping-system-java-jsp-servlets.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"DataFlair Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"DataFlair Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Online Shopping System in Java using JSPs &amp; Servlets - DataFlair","description":"Create online shopping system in Java using JSPs, Servlets and MySQL. Users can view, buy products and admins can add, edit, sell products","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/data-flair.training\/blogs\/online-shopping-system-java-jsp-servlets\/","og_locale":"en_US","og_type":"article","og_title":"Online Shopping System in Java using JSPs &amp; Servlets - DataFlair","og_description":"Create online shopping system in Java using JSPs, Servlets and MySQL. Users can view, buy products and admins can add, edit, sell products","og_url":"https:\/\/data-flair.training\/blogs\/online-shopping-system-java-jsp-servlets\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2021-07-13T03:30:11+00:00","article_modified_time":"2026-06-01T08:53:25+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/online-shopping-system-java-jsp-servlets.jpg","type":"image\/jpeg"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/online-shopping-system-java-jsp-servlets\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/online-shopping-system-java-jsp-servlets\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823"},"headline":"Online Shopping System in Java using JSPs &amp; Servlets","datePublished":"2021-07-13T03:30:11+00:00","dateModified":"2026-06-01T08:53:25+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/online-shopping-system-java-jsp-servlets\/"},"wordCount":1771,"commentCount":13,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/online-shopping-system-java-jsp-servlets\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/online-shopping-system-java-jsp-servlets.jpg","keywords":["advance java project","java ecommerce project","java online shopping system","java project","online shopping project"],"articleSection":["Java Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/online-shopping-system-java-jsp-servlets\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/online-shopping-system-java-jsp-servlets\/","url":"https:\/\/data-flair.training\/blogs\/online-shopping-system-java-jsp-servlets\/","name":"Online Shopping System in Java using JSPs &amp; Servlets - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/online-shopping-system-java-jsp-servlets\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/online-shopping-system-java-jsp-servlets\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/online-shopping-system-java-jsp-servlets.jpg","datePublished":"2021-07-13T03:30:11+00:00","dateModified":"2026-06-01T08:53:25+00:00","description":"Create online shopping system in Java using JSPs, Servlets and MySQL. Users can view, buy products and admins can add, edit, sell products","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/online-shopping-system-java-jsp-servlets\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/online-shopping-system-java-jsp-servlets\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/online-shopping-system-java-jsp-servlets\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/online-shopping-system-java-jsp-servlets.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2021\/07\/online-shopping-system-java-jsp-servlets.jpg","width":1200,"height":628,"caption":"online shopping system java jsp servlets"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/online-shopping-system-java-jsp-servlets\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"Java Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/java\/"},{"@type":"ListItem","position":3,"name":"Online Shopping System in Java using JSPs &amp; Servlets"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team creates expert-level guides on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our goal is to empower learners with easy-to-understand content. Explore our resources for career growth and practical learning.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam1\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/98185","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=98185"}],"version-history":[{"count":6,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/98185\/revisions"}],"predecessor-version":[{"id":148703,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/98185\/revisions\/148703"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/98201"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=98185"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=98185"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=98185"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}