Tag: JSP

Show Current Date in JSP Page In this example, We will show sample program about, How to show current date in JSP page. This example has been tested with apache tomcat server environment and output has been shared in the same post. Example Program <%@page import="java.text.SimpleDateFormat"%> <%@page import="java.text.DateFormat"%> <%@page import="java.util.Date"%> <%@ page language="java" contentType="text/html; charset=ISO-8859-1" […]
Get Client IP Address in JSP In this example, We will show you simple program about, How to get client IP address in JSP page, When client give the request for the particular page in the web browser. This example were tested and output shared in the same post. Example Program <%@ page language="java" contentType="text/html; […]
Return JSON Response in Servlet In this example, we will show simple example about how to return Json response in servlet. The example program has been tested with apache tomcat environment and output are shared in the post. Project Structure Servlet Class (EmployeeService.java) package com.dineshkrish.service; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; […]
Read Cookies in Servlet In this example, we will show you simple program about how to read cookies in servlet. The example program has been tested with Google Chrome browser and output shared in the below post. Note: Before going to proceed with this example make sure that, you have already created cookies using servlet. […]
Create Cookies in Servlet In this simple example, we will show you how to create cookies in servlet. This particular example has been tested with Google Chrome browser environment. The example source code has been explained step by step in the below post. Servlet Code (MyCookieServlet.java) package com.dineshkrish.servlet; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import […]
Simple Login Application using Servlet This example will show step by step procedure to develop Simple Login Application using Servlet technology. In this tutorial, We will show you how to develop simple login application using Servlet, JSP, and JDBC. The example has been tested with MySQL and Apache Tomcat Server environment and output has been […]
Display Multiple Records from Database in JSP This example about, How to Display Multiple Records from Database in JSP, Servlet and JDBC Project Structure Table Information Table Query CREATE TABLE student_details(firstName varchar(30), lastName varchar(30), age int, emailId varchar(50), contactNumber varchar(12), address varchar(100)); INSERT INTO student_details VALUES(‘Dinesh’, ‘Krishnan’, 25, ‘dinesh@idineshkrishnan.com’, ‘9941937705’, ‘India’); INSERT INTO student_details VALUES(‘Johanthan’, […]
Simple Registration Application using Servlet In this tutorial, I have written code about, Simple Registration Application using Servlet, JSP, and JDBC. The application was tested in MySQL Database and same has been shared in the article. Project Structure Table Query CREATE TABLE student_details(firstName varchar(30), secondName varchar(30), age int, emailId varchar(50), dob date, contactNumber varchar(12), qualification […]