Implicit objects provide programmers with access to many servlet capabilities in the con-text of a JavaServer Page. Implicit objects have four scopes: application, page, request and session. The JSP and servlet container application owns objects with application scope. Any servlet or JSP can manipulate such objects. Objects with page scope exist only in the page that defines them. Each page has its own instances of the page-scope implicit objects. Objects with request scope exist for the duration of the request. For example, a JSP can par-tially process a request, then forward the request to another servlet or JSP for further pro-cessing. Request-scope objects go out of scope when request processing completes with a response to the client. Objects with session scope exist for the client’s entire browsing ses-sion. Figure 31.2 describes the JSP implicit objects and their scopes. This chapter demon-strates several of these objects.
Note that many of the implicit objects extend classes or implement interfaces discussed in Chapter 30. Thus, JSPs can use the same methods that servlets use to interact with such objects, as described in Chapter 30. Most of the examples in this chapter use one or more of the implicit objects in Fig. 31.2.
Copyright © 2018-2020 BrainKart.com; All Rights Reserved. Developed by Therithal info, Chennai.