您的位置:首页 >> 编程开发 >> Java >> J2EE >> 正文
RSS
 

JSP Tag Libraries @ JDJ

http://www.rdxx.com 05年08月10日 20:22 Java频道 我要投稿

关键词: JSP , JDJ , IE

JSP Tag Libraries
by Gal Schachor, Adam Chace, and Magnus Rydin
Published by
Manning Publications Co.
Price: $44.95

Tag libraries were introduced into the Java specification to solve many of the limitations of using scriptlets (bits of Java code) as part of a JSP page. The main limitation is that advanced page design may require the designer to understand Java to perform tasks such as constructing a loop, if/else blocks, and sending an e-mail, and so on. Art designers and HTML developers are creating many pages in today's Web development environment, making this approach less than optimal. Tags provide a mechanism that will allow a non-Java developer to utilize Java functionality without having to learn the language. Tags can also assist Java developers in separating presentation from control. Tag libraries were introduced as part of the JSP 1.1 specification.

JSP Tag Libraries is published by a small book company (Manning Publications) known for writing books of very good quality. As this publishing company is smaller than the Wroxes and Addison-Wesleys of the world, you may not find it on the local bookstore's shelf, and may have to order it through Amazon or Fat Brain. Reasonably priced at $44.95, it has about 600 pages, divided into 15 chapters. This book doesn't waste your money by selling you freely downloadable Javadocs.

As I started to read, I noticed that the book was very well thought out. It contained only minor typographical errors and had a good flow. This book is not sloppy like others I've read in the past, and I appreciate that the authors actually understand how to use the English language. It doesn't read like a manual but more like a conversation, developer to developer.

Part 1 begins with a light introduction to Web development using Java. It covers how JSPs are developed and goes into sufficient detail on their strengths as well as their limitations. Later chapters cover a tag's life cycle and how it may be used. Typically, an experienced developer may decide to skip over this section, but I recommend reading it, as it also has some hidden gems on JSPs.

Part 2 covers basic techniques on how to develop a tag. The first useful tag that is developed is for sending e-mail. Other tags that are introduced cover interaction with a JavaBean, using tags for validation, assertions, control of flow, as well as accessing the application's back end. Chapter 8, one of the best chapters, covers writing a tag that discovers a JavaBean's methods and events at runtime (reflection), a useful technique for all tag developers.

Part 3 dives into advanced techniques for creating conditional tags to insulate HTML developers from the tricky syntax of creating if/else and loops using scriptlets. Chapter 11 introduces usage of tags with Model 2 architectures. Chapter 12 focuses on using tags in a J2EE environment, and covers usage of EJBs and integration with business logic. There is an awesome discussion on using tags along with JNDI. Within this chapter, two really powerful tags are introduced, one for looking up a bean's home and remote interfaces, and another for connecting to a JDBC data source.

共2页  1 2

 
 
标签: JSP , JDJ , IE 打印本文
 
 
  热点搜索
 
 
 



Valid XHTML 1.0 Transitional
Copyright ©2005 - 2008 Rdxx.Com,All Rights Reserved
收藏本页
收藏本站