O'Reilly logo

J2EE™ Applications and BEA™ WebLogic Server™ by Sandra L. Emerson, Rob Woollen, Michael Girdley

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

Using Java Beans with JSPs

The JSP specification enables you to include JavaBeans, which are different from the Enterprise JavaBeans discussed later in this book. JavaBeans encapsulate presentation logic or rudimentary business logic in your pages. By encapsulating logic in a JavaBean, you can keep your Web developers from accidentally compromising or corrupting your Java code. JavaBeans help you create more maintainable pages.

Integration of JavaBeans with JSP pages is done through the use of three JSP actions. Let's take a look at each of these tags and how to use them.

JSP Tags for Using Beans

The <jsp:useBean> tag enables a JSP developer to specify a JavaBean to be included in the JSP page. This tag tries to instantiate a JavaBean, and gets ...

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