Datasheet

Patrick c01.tex V3 - 09/18/2009 12:15pm Page 10
Chapter 1: Building Web Applications in WebLogic
direct use of implicit objects in JSP scriptlet code is considered poor form. The JavaServer Pages
Standard Tag Library (JSTL), discussed later in this chapter, provides access to data stored within
these implicit objects — and many others — in a much safer and more standard way.
Table 1-3: JSP Implicit Objects
Object Type Description
request
javax.servlet.http.HttpServletRequest
Provides access to request
information and attributes set at the
request scope.
response
javax.servlet.http.HttpServletResponse
Reference to the response object
being prepared for return to the
client.
pageContext
javax.servlet.jsp.PageContext
Provides access to attributes set at
the page scope.
session
javax.servlet.http.HttpSession
Session object for this client;
provides access to attributes set at
the session scope.
application
javax.servlet.ServletContext
Application context; provides
access to attributes set at the
application scope.
out
javax.servlet.jsp.JspWriter
PrintWriter object used to place text
output in the HTTP response.
config
javax.servlet.ServletConfig
Reference to the servlet
configuration object set during
initialization; provides access to
initialization parameters.
Session tracking is available by default in JSP pages. If your application is not using session tracking,
you should disable it to avoid unnecessary session persistence. Although there is no explicit way
to disable session tracking for the entire web application, servlets will not create sessions unless
the servlet code calls the
getSession()
method. JSP pages may disable sessions using the
page
directive:
<%@ page session="false" %>
Even if your JSP does nothing with the session information, WebLogic Server must persist the last
access time for the session at the end of the request processing. It is best to disable session tracking
explicitly in JSP pages that do not use it.
10