JavaServer Pages (JSP) are a great mechanism for delivering dynamic Web-based content. JSP provides a set of predefined tags, but you can also define your own tag extensions that encapsulate common functionality. This article will show how easy it is to build, deploy, and use your own custom JSP tag, using the Servlet/JSP reference implementation, Tomcat. (1,700 words)
Window toolkits typically provide a layout mechanism that positions widgets in a container. For example, AWT and Swing have layout managers, and VisualWorks Smalltalk has wrappers. This article presents a template mechanism for JSP that allows layout to be encapsulated and reused. JSP templates minimize the impact of layout changes and encourage modular design. (1,600 words)
3. Foundations of JSP design patterns: The View Helper pattern
This article, an excerpt from Foundations of JSP Design Patterns (Apress, 2004), describes the View Helper pattern and shows how to build a few useful view helpers that you can add to your own toolkit. (2,300 words; November 1, 2004)
Dynamically included JavaServer Pages (JSP) pages and servlets offer simple, but limited means for frontend code encapsulation and reuse. A dynamically included resource often relies on runtime data (request parameters, JSP-scoped attributes), and this restricts the runtime context from which it can be included. This article shows how to achieve true black-box reuse of frontend logic in the form of JSP pages or Java servlets, by wrapping the servlet request object and effectively creating a local runtime context for an included resource. (2,900 words; December 5, 2003)
5. Combine the power of XPath and JSP tag libraries
In this article, we'll examine the XPath custom tag library for JSPs and see a tag collection that provides simple control constructs and a uniform attribute value substitution facility, all of which combine to reduce complexity and improve functionality. Additionally, this enables a clear separation between the roles of a page author and a programmer. (2,500 words)
JavaServer Pages (JSP) 2.0 introduced many new features that will change the way you develop Java Web applications. In this article, Andrei Cioroianu walks you through three examples that show how to separate the JSP/HTML markup from the Java code using the new expression language (EL) and developing custom tags with dynamic attributes. You'll be able to reuse this article's generic JSP tag in your own applications to invoke JavaBean methods in a way that lets you take advantage of the JSP 2.0 expression language. (3,000 words; May 23, 2003)
7. Add the power of asynchronous processing to your JSPs
Applications based on message-oriented middleware (MOM), such as Java Messaging Service (JMS), tend to be more scalable than those based on remote procedure call (RPC) middleware, such as RMI. But that added scalability does not come for free. Because it forces the developer to think in a discontinuous and unnatural mode, asynchronous programming is inherently more complex than synchronous programming. In this article, Tarak Modi shows how to bring the power of JMS to JavaServer Pages developers who are excellent at content development but not interested in the intricacies of asynchronous programming. (3,700 words)
8. JSP Standard Tag Library eases Webpage development
The release of JavaServer Pages (JSP) Standard Tag Library (JSTL) is a significant development for JSP/servlet developers. With an expression language (EL) and a set of four powerful, easy-to-learn standard tag libraries, JSTL is likely to soon become the dominant approach for implementing dynamic, Java-based Websites. (4,100 words; February 28, 2003)
Advancements in the JavaServer Pages (JSP) specification, along with increased availability of JSP development tools and increased coverage of JSP development techniques, have facilitated the development of highly maintainable and standardized JSP-based Web applications. This article discusses key instances of these advancements and how each progression enables easier development of robust JSP Web applications. This article's best practices will help you make the most of JSP's strengths and prepare you to take advantage of future JSP enhancements. (5,000 words; July 25, 2003)
JavaServer Pages (JSP) 2.0 introduced many new features that will change the way you develop Java Web applications. In this article, Andrei Cioroianu walks you through three examples that show how to separate the JSP/HTML markup from the Java code using the new expression language (EL) and developing custom tags with dynamic attributes. You'll be able to reuse this article's generic JSP tag in your own applications to invoke JavaBean methods in a way that lets you take advantage of the JSP 2.0 expression language. (3,000 words; May 23, 2003)