j2ee: Java Code in JSPs - different mechanisms [2/27] Previous pageContentsNext page

Let's review the mechanisms we have seen so far to run Java code in a JSP.

  1. Scriptlets - call Java code directly
  2. Scriptlets - call Java code indirectly (use of utility classes)
  3. Beans - utility classes as Beans, use the jsp:useBean, jsp:getProperty, jsp:setProperty actions to call the Bean code
  4. MVC - use the MVC architecture with JavaBeans

These are listed in order of complexity or application development team size. By employing more of these techniques, we can separate the project into the areas of expertise needed to complete the coding.

The next two techniques we'll look at are the JSP expression language, and custom tag libraries

  1. JSP Expression Language - using a shorthand syntax for accessing objects and their properties
  2. Custom Tag libraries - using tag handler classes as specialized code to handle specific display functionality

Previous pageContentsNext page