O'Reilly logo

J2EE™ and Beyond: Design, Develop, and Deploy World-Class Java™ Software by Art Taylor

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

JavaBeans or Custom Tag Libraries: Tips on Usage

JavaBeans and custom tag libraries are two different approaches to the same problem: how to extend the Java code on the JSP page. Since we would like to keep the use of scriptlets on the JSP page to a minimum, we need some mechanism to make use of Java helper classes on the JSP page. JavaBeans provide this capability in such a way that almost any valid Java class could be made into a JavaBean. The only requirement is that any properties accessed using the JSP getProperty or setProperty tag would require the coding of get and set methods in the class, using a specific naming convention, but this is not required.

The use of tag libraries with JSP pages is more restrictive in terms of the coding effort ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required