When a browser requests a JavaServer Page (JSP), the ATG platform locates the associated document, compiles it into Java code (unless it is pre-compiled), then converts the code into an HTML page for browser display. Because the HTML is generated at runtime, it can incorporate dynamic elements that customize the page for each user who requests it. JSP pages that run on the ATG platform can pass information to JavaBeans, servlets, and other Java conventions and receive the output of these operations.
Summary of JSP Functionality
An application built from JSPs has the following built-in capabilities available to it:
Display property values of Nucleus components. See Displaying Dynamic Values in this chapter.
Display forms that connect to Nucleus component properties, so current property values can appear in input fields, and user-entered values can be saved to components. See the Forms chapter.
Invoke ATG servlet beans at specified points in a page, returning the output of the servlet as a dynamic element of the page. Components that generate HTML are derived from the Java Servlet standard. See Embedding Pages in this chapter and Embedding ATG Servlet Beans in Pages in the Using ATG Servlet Beans chapter.
Invoke servlet components with HTML passed in as parameters. In this way, servlet components can dynamically generate HTML, so specific HTML tags do not need to be embedded in the Java code. Thus, the HTML-generated display and Java-generated functionality can be maintained in separate files. See Embedding ATG Servlet Beans in Pages in the Using ATG Servlet Beans chapter.
Set Nucleus components to a scope, which determines its availability to other application elements. See Changing a Component’s Scope and Description.
Extract data stored in XML Data Object Models, transfer it to Nucleus components and render it in a JSP. See Integrating XML With ATG Servlet Beans.
This chapter shows how to build JSPs on the ATG platform, focusing on special features that are provided by the DSP tag library. The chapter contains these sections: