Changes Ahead for JSP Developers

 
 
By Timothy Dyck  |  Posted 2002-09-02 Email Print this article Print
 
 
 
 
 
 
 

Major ease-of-use modifications coming to JavaServer pages update.

The next version of the JSP Web page scripting language is undergoing major changes for its 2.0 release.

The proposed final specification for JavaServer Pages 2.0 was published Aug. 16. Before Version 2.0 can be finalized, however, reference implementation and compatibility test suites must be developed. Specification changes could still occur, but they will be as minimal as possible, so now is a good time for Java developers to look at what will be in next yearís products.

JSP 2.0 has three major changes, all of which make the language significantly easier to use for non-Java programmers.

First, JSP 2.0 includes the new JSP Standard Tag Library, a collection of JSP tags that provides a large set of standard programming functions, including session manipulation, try/catch blocks, conditionals and loops. There are also tags for HTTP URL access, internationalization, date and time formatting, submitting SQL queries or updates, and manipulating XML data. These changes move JSP toward the strictly tag-based page development style popularized by Macromedia Inc.s ColdFusion.

Second, JSP 2.0 supports a new expression and variable manipulation syntax based on both ECMAScript and XPath. This expression language provides built-in support for nested data structures and collections of objects, automatic type conversion, and default values for uninitialized variables.

Both of these are big steps forward and make it possible to write significantly more complicated and feature-rich JSP pages without having to drop down to using embedded Java code. Administrators can now flag and prohibit pages that have embedded Java script, for cleaner separation of presentation JSP code from back-end business logic.

Not having to continually switch between a tag-based syntax and Javas procedural syntax will make JSP more accessible and consistent. The move to allow developers to use an untyped variable assignment system alone is a big advancement because it means JSP developers dont have to understand Javas data types and continually convert between them to avoid compiler errors.

eWeek Labs uses JSP extensively in internally developed applications, and we believe these are great changes, particularly the expression languages support for default values. We wont have to write a block of boilerplate code at the top of every page that turns unassigned string parameters into assigned empty strings to avoid null pointer exceptions later in our code. The scripting language will do it automatically.

The JSP Standard Tag Library includes the scripting language and can be run on current JSP 1.2 servers if manually installed; check out the Apache Software Foundations implementation.

The third change is the ability to write custom JSP tags in JSP syntax instead of in normal Java, making them easier to create.

West Coast Technical Director Timothy Dyck can be reached at timothy_dyck@ziffdavis.com.

 
 
 
 
Timothy Dyck is a Senior Analyst with eWEEK Labs. He has been testing and reviewing application server, database and middleware products and technologies for eWEEK since 1996. Prior to joining eWEEK, he worked at the LAN and WAN network operations center for a large telecommunications firm, in operating systems and development tools technical marketing for a large software company and in the IT department at a government agency. He has an honors bachelors degree of mathematics in computer science from the University of Waterloo in Waterloo, Ontario, Canada, and a masters of arts degree in journalism from the University of Western Ontario in London, Ontario, Canada.
 
 
 
 
 
 
 

Submit a Comment

Loading Comments...
 
Manage your Newsletters: Login   Register My Newsletters























 
 
 
 
 
 
 
 
 
 
 
Rocket Fuel