|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6. JSP Deliverables
Sun's standard practice for a Java API is to provide the API specification with documentation and a reference implementation, so developers and companies can refer to a code implementation as they develop their own. Sun provides the following deliverables for JSP technology:
- The JSP Specification - This document defines the application programming interface. The specification is a useful source document for JSP syntax.
- The JSP Reference Implementation - Sun licensed the JSP and Servlet Reference Implementation to the Apache Software Foundation. This project, called Tomcat@Jakarta, is freely distributable and licensed directly from Apache. Tomcat is already pre-integrated with the Apache Web Server, a popular Web server. For those not using the Apache Web Server, most other Web servers are well on their way to shipping support for JSP technology (see java.sun.com/products/jsp/ for more information).
Competitive Landscape
To understand how JSP technology fits in the progression of products supporting dynamic content, it is worth describing a few of the alternatives.
- CGI (Common Gateway Interface) - CGI programs were an early solution for simplifying dynamic content. CGI programs are typically written in C or in Perl, a freely-distributed programming language. Still prevalent in Web-based applications, they can experience severe performance problems when scaling to support high-volume access.
- Mod_perl is a plug-in for the Apache Web Server that integrates the Perl programming language with the Web server, so programmers can write Web server extensions in Perl. As a replacement for the CGI interface, mod_perl addresses some of the limitations of CGI. This is a powerful solution, but it still has the programmers developing the pages themselves, and is tied closely to the Apache Web Server.
- Microsoft Active Server Pages (ASP) technology is closer in spirit to JSP technology than the others because its goal is to simplify the page development process. ASP is essentially limited to the Microsoft IIS Web Server information, see java.sun.com/products/jsp/.) ASP relies heavily on Basic-based scripting languages, which tend to be less scalable and more difficult to maintain over time than a component-based approach.
Portability Across Platforms and Servers
JSP technology, as part of the Java family, is designed to adhere to the Write Once, Run Anywhere credo. Pages created with JSP technology can run on any server, on any platform. Components (such as JavaBeans or tag libraries) developed on one platform can run easily on another.
JSP is unique in this capacity - none of the other solutions have this degree of platform-independence and cross-platform portability. This frees businesses from depending on a single vendor for product solutions or development directions.
Scalability
Scalable performance is critical for Web pages that handle a significant volume of users. CGI pages have a significant weakness when scaling to handle many concurrent users. A CGI application creates a new process for each access, creating significant performance problems in high-volume sites.
JSP pages are compiled once when first invoked and remain in memory; this provides better scalability for high-volume sites than the CGI approach.
Ease of Development, Deployment, and Maintenance
Creating CGI programs and mod_perl scripts are tasks belonging to programmers familiar with the programming languages. The same can be said of writing beans or custom tag libraries - it requires familiarity with the Java language. But writing and maintaining JSP pages that call these custom components is a task that can be delegated to page authors familiar with HTML or XML. In other words, only the JSP technology really enables a tiered development methodology leveraging each person's skills (described above) in addition to a tiered architecture.
Some of the other differences are summarized in the table below. For a more direct comparison of the technologies, please see java.sun.com/products/jsp/.
CGI/Perl Mod_Perl ASP JSP Web server Any Web server Apache Web Server Microsoft IIS or Personal Web Server Any Web server, including Apache, Netscape, IIS today Portable across platforms/servers No No No Yes Reusable, modular code No No No Yes Scripting language C, Perl Perl VBScript, JScript Java Memory leak protection Yes No No Yes Supports concurrent access without separate processes No Yes Yes Yes
![]()
Web Page Designed By : Cheng-chien Yu Attaendant Class : Santa Monica College - CIS 36H Due Date : September 29, 2001.