Java Server Pages (JSP) is a view technology bundled with the Java Enterprise Edition (Java EE) specifications. It was considered as the default view technology for Java EE applications and alternative for the servlet applications. Where as servlet is a Java program which helps to write the plain†Java class, JSP jelps you to write the HTML page with the Java code. Servlet and JSP worked for the different purposes. Prior to JSP, only the servlet classes used for the logic and presentation purposes. The first version of the JSP 1.1 released with the J2EE 1.1 on December 1999. The latest version of JSP is JSP 2.2 released with Java EE 6.
The importance of JSP started faded away when the different view technologies taken as the alternative for the JSP. It makes important for the Java EE specification to improve the view technology and JSP looked very much outdated. †In the year of 2004, first specification of Java Server Faces (JSF) 1.0 release as another view technology within the Java EE package. Later JSF got the much significance and most of the projects adopted the alternative view technologies.
JSP pages can be run in any of the Java Web servers like Tomcat, Jetty, etc. When JSP pages are compiled by the servlet container, it is first translated to the servlets and then executed by the server. In short, JSPs are abstraction of the servlets. There are many popular frameworks developed using the JSP and Servlet as the core technologies including Apache Struts.
- Introduction to JSP†: A basic tutorial for JSP and it explains what is thhis technology.
- JSP Architecture + Lifecycle†: This tutorial highlights the JSP architecture and lifecycle methods init(), service() and destroy. Also the different phases of a JSP file when deployed to the server. First it converts to servlet, then compiled and executed.
- Create JSP Page in Eclipse†: It is a simple example to create your own Java Server Page (JSP) using the eclipse IDE. WIth neat screenshots, this post would be a step-by-step guide to create the web project.
- JSP Syntax†: How to write the web pages using JSP?. There are different syntax for initialization block, scriptlets, expressions, directives,etc. This article highlights each syntax with suitable example snippet.
- JSP Actions†:†JSP actions are one of the important component for dynamically running the application.
- JSP Implicit Objects†: There are nine implicit objects, namingly page, session, request, out, pageContext, exception, object, application. This post details out the each object with the simple to understand examples.
- JSP Redirect
- JSP API†:†List of most widely used JSP APIs and brief description about the each classes and interafces.
- Session Tracking in JSP†:
- How To Use JavaBeans in JSP?
- Auto Refresh a Web Page In JSP
- How To Debug JSP Page?
- How to Send Mail using JSP?
- Upload a File Using JSP
- JSP Expression Language (EL)
- Cookies Handling in JSP
- Exception Handling in JSP