What is it?

JavaServer Pages (JSP) technology is a framework for delivering Web applications. As part of the Java technology family, JSP technology allows software developers to dynamically generate HTML, XML or other types of documents in response to a Web client request. The technology allows Java code and certain pre-defined actions to be embedded into static content. The Web-based applications are platform independent. JSP typically is viewed as a high-level abstraction of servlets that is implemented as an extension of the Servlet 2.1 API. Both servlets and JSPs were originally developed at Sun Microsystems, initially created by Manohar Rao Mankala and later elaborated on as a specification by Jitender Taneja. JavaServer Pages are currently being developed under the Java Community Process.

Who is it for?

JSP technology is for Web developers and designers. It is not a tool, but a platform upon which tools are built. A Web page developer or designer who is familiar with HTML can use JSP technology without having to learn the Java language. JSP technology is usable without the ability to write Java scriplets because scriptlets are no longer required to generate dynamic content; however, they are still supported to provide backward compatibility. Java tag library developers and designers can extend the JSP language with a new simple tag extension API. This encourages the growing number of reusable tag libraries available, and in turn reduces the amount of code needed to write Web applications. The JavaServer Pages Standard Tag Library (JSTL) expression language is now integrated into JSP technology and has been upgraded to support functions.

Features

By separating the page logic from its design and display and supporting a reusable component-based design, JSP technology makes building Web-based applications faster and easier. The JSP syntax adds additional XML-like tags called JSP actions used to invoke built-in functionality. Additionally, the technology allows for the creation of JSP tag libraries that act as extensions to the standard HTML or XML tags. Tag libraries provide a platform independent way of extending the capabilities of a Web server. JavaServer Pages technology is an extension of the Java Servlet technology. Servlets fit seamlessly into a Web server framework and can be used to extend the capabilities of a Web server with minimal overhead, maintenance, and support. Together, JSP technology and servlets provide an alternative to other types of dynamic Web scripting and programming, offering platform independence, better performance, separation of logic from display, ease of administration, extensibility into the enterprise, and ease of use.

JSPs are compiled into Java Servlets by a JSP compiler, which then either generates a servlet in Java code that is then compiled by the Java compiler or generates byte code for the servlet directly. The new version of the JSP specification includes new features meant to improve programmer productivity, including an Expression Language (EL) which allows developers to create Velocity-style templates, a faster and easier way to display parameter values, and a clearer way to navigate nested beans.

Compatibility

The JSP platform includes scriptlets, declarations, and expressions, and its scripting language is Java by default. In addition, other languages are supported by the specification. The platform includes a rich framework for the development of tag libraries. Anything that can be described by HTML or XML tags can be implemented using the standard JSP technology.

Web Hosts that Offer JSP