Home Videos Exercises MCQ Q&A Quiz E-Store Services Blog Sign in Appointment Payment

Introduction of JSP

JSP technology is used to create web application just like servlet technology. It is an extension to servlet because it provides more functionalitythan servlet such as expression language, JSTL, etc.


What is JSP?

Initial release 1999 and latest release 31 april 2022. It was developed by sun microsystem


Advantages of JSP over servlet

  • Extension to servlet.
  • Fast development: no need to recompile and redeploy.
  • Less code than servlet
  • Easy to maintain

The life cycle of a JSP page

  • Translation of JSP page.
  • Compilation of JSP page
  • Class loading
  • Instantiation
  • Initialization
  • Request processing
  • Destroy

Creating a simple JSP page

To create the first JSP page, write some HTML code and save it by 'index.jsp'. Put it in a folder and paste the folder in the web-apps directory in apache tomcat to run the jsp page.


How to run a simple JSP page?

  • Start the server
  • Put the JSP file in a folder and deploy on the server

The JSP API

  • javax.servlet.jsp
  • javax.servlet.tagext

javax.servlet.jsp package

The javax.servlet.jsp package has two interfaces and classes.
1. JspPage
2. HttpJspPage


The class are as follows

  • JspWriter
  • PageContext
  • JspFactory
  • JspEngineInfo
  • JspException
  • JspError