JSP Tag Libraries and Scriptlets
Already we've examined a basic example of using JSP in OpenCms. This section will discuss JSP technology and the OpenCms tag libraries and APIs.
Essentially, there are two ways of writing JSP pages. The first is to leverage tag libraries to provide all of the functionality required in a page. In this case, a JSP page looks, for the most part, like an HTML page with some extra tags. Most of the page functionality is kept separate in Java classes, and the JSP deals simply with look-and-feel issues. Because this method of development strives to implement the Model-View-Controller (MVC) design pattern, Sun actively promotes this as the preferred way of developing JSPs. Also, since JSP taglibs look like HTML tags, HTML programmers can use them without needing to know anything about the complexities of Java code.
The second method of writing JSPs (and this method can be interlaced with the first) is to embed scriptlets—small bits of Java code—inside special JSP...