Today, you have looked at using JavaServer Pages as a means of developing Web-based J2EE applications. Unlike servlets, JSPs allow you to develop your Web pages in HTML with embedded Java code when dynamic elements are required.
JSP pages are translated into Java servlets and compiled before they are used to service client requests. To the browser, a JSP is no different than any other Web page.
JSP defines elements to supplement the standard HTML tags:
Directives that are used to pass information to the page translation phase
Expression Language and JSP expressions to embed dynamic data in the Web page
JSP scriptlets to provide programming logic
Actions that define JSP tags used to support JavaBeans
JavaBeans are used to encapsulate Java functionality to remove Java code from the Web page. JavaBeans help separate the role of Java developer from that of HTML Web developer. Beans are classes that have a no argument constructor and properties. Bean properties have names, are queried using getter methods, and are updated using setter methods.
In the next lesson, you will look at the JavaServer Pages Tag Library (JSTL) and you will see how to define your own custom tags as part of a tag library. Tag libraries support complex page features, such as the iterative processing of dynamic data (such as a list of customers).
18.118.198.61