Reflective XML-RPC
Java reflection offers a simple but effective way of hiding some of the complexity of remote procedure calls with XML-RPC (XML-based Remote Procedure Call). In this article, Stephan Maier shows how to wrap XML-RPC calls to a remote interface using the gadgets from the Reflection kit: The Proxy, the Array, and BeanInfo classes. The article will also discuss various ramifications of the approach and the use of reflective methods in RMI (Remote Method Invocation).
Stephan Maier, February 2005

Use search engine technology for object persistence
In this article, Mikhail Garber looks at how to address an old problem—provide simple persistence to basic JavaBeans—with a new twist. He shows you how to achieve this goal without the complexity of a full-blown database- or XML-driven solution. At the same time, he doesn't over-simplify the problem by falling back on silly property files and in-memory schemes. Instead, he shows you how to use common search engine technology to treat objects as documents being indexed and searched. You will be surprised by how robust and responsive this solution can become. Read on for a play-by-play account of how to build this system.
Mikhail Garber, January 2005

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.
Andrew Patzer, November 2004

Java Tip 140: Automatically generate JavaBeans from XSL files in J2EE applications
One way to write Java 2 Platform, Enterprise Edition (J2EE) applications that produce dynamic content is to use servlets, JavaBeans, XML, HTML, and XSLT (Extensible Stylesheet Language Transformations). In this tip, Klaus Berg looks closely at the automated conversion of HTML form parameter names to JavaBeans. Form parameters are a part of HTML embedded in an XSL file. The generated beans serve as intermediate storage in J2EE applications and hold user-entered data in an HTML input form. Typically, the beans convert into an XML tree that provides the input for an XSL transformation that finally produces the HTML output for the user.
Klaus P. Berg, July 2003

Call JavaBean methods from JSP 2.0 pages
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.
Andrei Cioroianu, May 2003

Java Tip 138: Still parsing to generate your JavaBeans' XML representation?
Empower your JavaBeans to handle data conversion to and from their XML document format without complicating the code. This tip shows you how to write and use a component to convert a JavaBean to its XML document representation and vice versa.
Paulo Caroli, May 2003

Sort it out
A common requirement for applications that display lists or tables of data is the ability for users to sort those results. In this article, Alex Blewitt shows how to sort data in Java using the Comparable and Comparator interfaces, and how a generic bean-sorting utility sorts JavaBeans displayed in a graphical user interface (GUI).
Alex Blewitt, December 2002

Generate JavaBean classes dynamically with XSLT
For some projects, you need a more flexible business object structure. For example, different companies may have different requirements for Product bean properties. Without a proper framework, you may end up spending long hours customizing your data structures for every new customer, soon finding yourself with parallel software versions. This article lays a foundation for a simple framework to build truly adaptive systems, saving you hours of routine programming. As a bonus, you get a refresher on JDBC (Java Database Connectivity) and JSPs (JavaServer Pages), and you'll also learn how to use XSLT (Extensible Stylesheet Language for Transformations) to generate Java source code.
Victor Okunev, February 2002

Get disconnected with CachedRowSet
The new CachedRowSet, still in early access release, provides benefits that developers can begin to take advantage of right away. Taylor Cowan demonstrates how you can use a CachedRowSet as the data model for a JavaServer Pages (JSP) entry/edit form. Assuming that you have some experience with JSP development, he describes step by step how to implement navigation, updates, inserts, and deletes using a CachedRowSet JavaBean. In addition, he shows how the CachedRowSet helps to reduce database-update SQL statements and the use of valuable database connection resources. (2,100 words)
Taylor G. Cowan, February 2001

Validation with pure Java
The importance of employing a good data-validation framework cannot be overestimated. Eventually, someone (maybe even yourself!) is going to reuse the classes you've created. Unless your objects come with a built-in, robust data-validation mechanism that requires little maintenance, you'll need to advise that someone about the valid data ranges accepted by those objects. The core Java API has everything you need to solve this problem in the most elegant way. In this article, you will build a foundation for the data-validation framework whose grown-up version has been implemented successfully in large-scale commercial projects. (1,500 words)
Victor Okunev, December 2000

Encapsulate reusable functionality in JSP tags
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)
Simon Brown, August 2000

Script JavaBeans with the Bean Scripting Framework
Sometimes a problem you'd like to solve in Java has already been solved in some other language. Or sometimes you'd like to use some of your great Java code from another language. The Bean Scripting Framework (BSF) from IBM's alphaWorks lets Java classes call functions written in several scripting languages. It also extends those scripting languages, letting them use Java classes and Java beans transparently. This article introduces the BSF, with sample programs and descriptions of possible applications. (3,600 words)
Mark Johnson, March 2000

Using XML and JSP together
XML and JSP are two of the hottest buzzwords these days. This article shows how you can use these two technologies together to make a dynamic Website. You also get a look at code examples for DOM, XPath, XSL, and other Java-XML techniques.
Alex Chaffee, March 2000

Build distributed applications with Java and XML
XML is a popular way to represent data in a portable, vendor-neutral, readable format. But what if you need to send XML data across a process boundary in a distributed application? Bruce Martin examines three approaches to accomplishing that in Java. (3,000 words)
Bruce Martin, February 2000

Process XML with JavaBeans, Part 3
Last month's JavaBeans column showed you how to use XML JavaBeans to create a simple XML editor. This month, Mark Johnson demonstrates the XMLConvenience bean set, which simplifies building visual XML processing applications with XML JavaBeans. (3,500 words)
Mark Johnson, January 2000

All

Wizard API updated!
Tim Boudreau has released a new version of the Swing Wizard library (version 0.997) that fixes the WizardException bug reported in JavaWorld's recent Open Source Java Project profile. The article's examples have been reworked to test out the new, improved WizardException. Thanks, Tim, for this helpful fix!
Open Source Java Projects: The Wizard API

Newsletter sign-up

Sign up for our technology specific newsletters.

Enterprise Java
View all newsletters

Email Address: