Application logic in JSPs

The application logic in JSPs can be provided by components such as servlets, JavaBeans, and EJBs, customized tag libraries, scriptlets, and expressions. Scriptlets and expressions hold the components and tags together in the page.

JavaBeans

You can easily use JavaBeans components in a JSP with the useBean tag. For more information, see “<jsp:useBean>”.

Enterprise JavaBeans

To use an EJB component, you need to use JNDI to establish an initial naming context for the EJB’s home interface. You could do this in a scriptlet, using a JavaBeans component, or using a custom tag.

Custom tag libraries

Custom tag libraries define a set of actions to be used within a JSP for a specific purpose, such as handling SQL requests. See “Custom tags”.