Employee Management System JSP Servlet Project

org. comp.model Employee Model – Employee.java package org.comp.model; import java.io.Serializable; import java.math.BigDecimal; import java.util.Objects; public class Employee implements Serializable { private static final long serialVersionUID = 1L; private Long id; private String name; private String department; private String designation; private BigDecimal salary; public Employee() { } public Employee(Long id, String name, String department, String designation, … Read more

Showing all request header in servlet

This tutorial will find the read request header name and values in the servlet. There are many requests headers present like: host, connection, user-agent, cookie, etc. In the below project, we read the request project header names and values. Technology User apache-tomcat-9.0.71javaee-web-api 7.0 Java 1.8 Steps to develop this project Create a Java with Maven … Read more

How to do pagination in JSP with Servlet JDBC and MYSQL

How to do pagination in JSP is very interesting concept let see step by step. What is Pagination? Pagination in programming refers to dividing an extensive data set into smaller, more manageable chunks called pages. It is commonly used when working with databases or APIs to efficiently handle large amounts of information. Advantages of Pagination? … Read more

Sending data to servlet HTTP get method

Here we will discuss Servlet HTTP get method What is a Servlet? A servlet is a Java-based program that runs on a web server. It handles client requests and generates dynamic web content. Servlets are an integral part of Java EE (Enterprise Edition) and are widely used for web development. HTTP GET Method The HTTP … Read more

How to get multiple parameters in ServletContext

index.html

web.xml

ServletContext.java

Results Read More How to access ServletContext parameters How to access ServletConfig initial parameter value

How to insert data in MySql Using JSP Servlet & JDBC

Here we will insert data in MySQL using JSP Servlet and JDBC. Here We will fetch Data from the JSP page and pass it to Servlet then DAO which contains JDBC code to store data in the MySQL database. How To Get Data From Database To Servlet Jdbc JSP Technology used Steps for Data insertion … Read more

Servlet Annotation WebServlet Example

The first example is to show Servlet Welcome using Servlet Annotation WebServlet. For this we have created an index.html page on index.html we have created a link. On clicking on link it will call welcome servlet. Our project directory structure is as per below index.jsp

Show welcome servlet

Welcome.java

Servlet Welcome

Read more

Servlet Maven Configuration Example

Maven is the Project Management Tool, that helps developers to build the project easily (make create, add, update, compile, test, and deploy work easily).   You can download Maven from Official Site You can find the servlet dependency file here Technologies used here are as below Here we will start a new project with maven Select … Read more

getting all request parameters in servlet

before this we have used request.getParameter(String) which is used to get a single request parameter value. Now if we want to get all parameter names then we have to use request.getParameterNames() it returns Enumeration of String objects of all parameter names. After getting all parameter names we can get its value using request.getParameter(String) . request.getParameterNames() … Read more

ServletConfig to access multiple initial parameter value

ServletConfig is ued to configure the servlet. We can configure values in the ServletConfig object and can access them later on. There can one or more values can be stored. ServletConfig stores values in key values pair. ServletConfig to access initial parameter value All values are stored in key-value pairs in <servlet> the tag in … Read more