JSP tutorial || What is JSP || Why we use JSP

JSP tutorial

Java server page is technologies for server side programming as well as client site programming. In this JSP tutorial, we will focus on what is JSP and why we use JSP page. and other basic term related to Java server page(JSP).

What is JSP?

JSP is Java server page. this technology is used to create dynamic web applications. JSP adds Java code inside HTML using JSP tags. We can do server-side programming using JSP as well as Html for client side. JSP allows us to write HTML code containing tags, inside which we can include powerful Java programs. Using JSP, one can easily separate Presentation and Business logic as a web designer can design and update JSP pages creating the presentation layer.

Some important point you should remember about JSP page.

  1. In JSP you can write HTML code as well as Java code in JSP file.
  2. JSP is faster than another programming language.
  3. In MVC architecture also we can use JSP as a view part.
  4. JSP is a part of  JavaEE. It’s used to develops high-security web application Like enterprise application.
  5. JSP allows JavaBeans object and database code.
  6. We can write complete java code in JSP like collection, multithreading, exception handling etc.

Write your first program in JSP:

Create index.jsp file in your favorite IDE tool like eclipse or netbeans.

<%@ page language=<em>"java"</em> contentType=<em>"text/html; charset=ISO-8859-1"</em>


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">



<meta http-equiv=<em>"Content-Type"</em> content=<em>"text/html; charset=ISO-8859-1"</em>>

<title>Insert title here</title>




out.println("My First JSP code");




In Jsp file we can write java code or bussiness login also only we need to write that java code inside <%     %> tag.


out.println("My First JSP code");


One Comment

Add a Comment

Your email address will not be published. Required fields are marked *

fourteen + 5 =