The following is a description of the step-by-step process of the JSPProvider invoking a JSP.
The JSPProvider.getContent() method is called and the JSPProvider looks up the JSP to be executed. It calls a common private method to service the JSP.
The provider then creates request and response objects, copies information (such as cookies) from the Desktop request to those objects, initializes the session information, and checks to see if a servlet wrapper for the JSP already exists. If not, a servlet wrapper is created. The service method is then called on the wrapper.
The servlet wrapper service method loads the JSP. Before loading, it checks to see if the JSP class file is out of date with the class file. If the JSP class file is out of date with the class file, it invokes the compiler to compile the JSP into a class file and read the class file into memory and uses the class loader to define the new class.
Finally, the JSP servlet is instantiated and the init() method is called on the JSP.
Once the JSP is loaded, the JSP’s service method is called by the servlet wrapper service method.
After the JSP’s service method completes, the JSPProvider getContent() method extracts the response body from the processed JSP file and returns it as a StringBuffer.