Chapter 8. JavaBeans

Topics in this Chapter:

  • Modularity & Code Reuse

  • JavaBeans

  • Using JNDI

  • An Authentication JavaBean Using LDAP

Previous examples have made extensive use of embedding JSP using the include action (<jsp:include />) and the include directive (<%@ include %>). Each of these methods works in slightly different ways, but both present significant scalability problems.

The include directive (<%@ include %>) effectively inserts code inline. This can create potential namespace collisions or significant problems with overlapping declarations. The include action (<jsp:include />) inserts the output of a second JSP page into the original page. This can create problems in trying to share data or when the secondary JSP does something erratic.

For ...

Get Core JSP now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.