Home | Business News | Browse by Publication | J | Java Developer's Journal

JSP 2.0 technology: the community delivers! (J2EE).

Publication: Java Developer's Journal
Publication Date: 01-JUL-03
Format: Online
Delivery: Immediate Online Access

Article Excerpt
JavaServer Pages (JSP) technology originated more than four years ago as a powerful way to dynamically generate HTML on the server side. Over time, and with the input of the developer community, JSP technology has evolved and matured, keeping simplicity at the forefront. The next generation of JSP technology, version 2.0, will be released with J2EE 1.4 and represents an easy-to-use, robust, and extensible technology for building Web applications, well suited toward generating dynamic Web content in such formats as HTML DHTML, XHTML SVG, and XML.

The JSP 2.0 specification introduces many new features, including a simple yet flexible integrated expression language, an encapsulation mechanism called tag files, a simplified tag extension API, and a substantially improved XML syntax. Let's explore some of these features and see what they mean for your Web project.

The Evolution of ISP Technology

In its early stages, the focus of JSP technology was to enable the generation of dynamic content by embedding scriptlets (pieces of Java programming language code) within HTML template data. Programming with scriptlets can be quite flexible and powerful at times and is suitable for some types of projects. For many projects, however, such as those that follow a Model/2 or MVC (Model-View-Controller) architecture, embedding scriptlets in the presentation layer can have several disadvantages, including:

1. The Web designers on your project need to learn the Java programming language, which has a fairly steep learning curve in comparison to, say, the JavaScript programming language. Furthermore, pages created with JSP technology ("JSP pages") with scattered pieces of code can become difficult to read and maintain.

2. It becomes too easy to mix business logic with presentation logic, especially when working under a deadline. Even well-intentioned developers working on well-designed Web applications may find it tempting to introduce business logic in the presentation layer.

3. Code becomes more difficult to reuse. Scriptlets frequently lead to copying and pasting of code. Tag extensions are often used to encapsulate and reuse such code. However, until this release of the specification, writing tag extensions has been a tedious and time-consuming process.

JSP technology has evolved in various ways that help make writing pages without inline scriptlets much more of a reality. These evolutions have come in the form of both changes to the specification and add-on technologies. The introduction of tag libraries in version 1.1 of the JSP specification allowed for JSP technology to be extended, and MVC frameworks like Struts began to evolve, providing a simple way to abstract business logic from the presentation layer. After improvements to tag library support in version 1.2 of the JSP specification, the JSP Standard Tag Library (JSTL) was introduced, providing a core set of useful actions such as iteration, internationalization, formatting, SQL database access, and XML manipulation. JSTL also introduced an expression language that's much easier to read and write than scriptlets. Over time, these incremental changes have helped JSP technology become quite suitable for architectures in which it is used purely as a presentation layer, while maintaining strong support for other architectures as well.

The latest JSP specification is currently in the Proposed Final Draft stage and it's under development in the Java Community Process (JCP) as Java Specification Request (JSR) 152. In combination with JSTL, the features introduced in the JSP 2.0 specification yield a cleaner, easier-to-use, and higher-performing language. In fact, page authors using JSP 2.0 technology no longer need to know or use the Java programming language, which in and of itself dramatically decreases their training requirements. Furthermore, the introduction of features like tag files and simple tag extensions enable new reuse...

Read the FULL article now - Try Goliath Business News - FREE!   
You can view this article PLUS...

  • Over 5 million business articles
  • Hundreds of the most trusted magazines, newswires, and journals (see list)
  • Premium business information that is timely and relevant
  • Unlimited Access

Now for a Limited Time, try Goliath Business News - Free for 3 Days!
Tell Me More   Terms and Conditions

Get Goliath Business News for 1 year - Just $99 (Save 65%)
Tell Me More   Terms and Conditions

Already a subscriber? Log in to view full article



More articles from Java Developer's Journal
Sleeping tigers. (J2SE Insight)., July 01, 2003
Trimming the fat from Swing. (Graphical API)., July 01, 2003
Avoid bothersome: garbage collection pauses: use Java in mission-criti..., July 01, 2003
The MIDlet marketplace. (J2ME Insight)., July 01, 2003
Xlet: the life cycle of an Xlet: a different kind of Applet for J2ME. ..., July 01, 2003

Looking for additional articles?
Search our database of over 3 million articles.

Looking for more in-depth information on this industry?
Search our complete database of Industry & Market reports by text, subject, publication name or publication date.

About Goliath
Whether you're looking for sales prospects, competitive information, company analysis or best practices in managing your organization, Goliath can help you meet your business needs.

Our extensive business information databases empower business professionals with both the breadth and depth of credible, authoritative information they need to support their business goals. Whether it be strategic planning, sales prospecting, company research or defining management best practices - Goliath is your leading source for accurate information.