request
This is the HttpServletRequest associated with the request, and lets you look at the request parameters (via getParameter), the request type (GET, POST, HEAD, etc.), and the incoming HTTP headers (cookies, Referer, etc.). Strictly speaking, request is allowed to be a subclass of ServletRequest other than HttpServletRequest, if the protocol in the request is something other than HTTP. This is almost never done in response
This is the HttpServletResponse associated with the response to the client. Note that, since the output stream (see out below) is buffered, it is legal to set HTTP status codes and response headers, even though this is not permitted in regular servlets once any output has been sent to the client.
out
This is the PrintWriter used to send output to the client. However, in order to make the response object (see the previous section) useful, this is a buffered version of PrintWriter called JspWriter. Note that you can adjust the buffer size, or even turn buffering off, through use of the buffer attribute of the page directive. This was discussed in Section 5. Also note that out is used almost exclusively in scriptlets, since JSP expressions automatically get placed in the output stream, and thus rarely need to refer to out explicitly.
session
This is the HttpSession object associated with the request. Recall that sessions are created automatically, so this variable is bound even if there was no incoming session reference. The one exception is if you use the session attribute of the page directive (see Section 5) to turn sessions off, in which case attempts to reference the session variable cause errors at the time the JSP page is translated into a servlet.
application
This is the ServletContext as obtained via getServletConfig().getContext().
config
This is the ServletConfig object for this page.
pageContext
JSP introduced a new class called PageContext to encapsulate use of server-specific features like higher performance JspWriters. The idea is that, if you access them through this class rather than directly, your code will still run on "regular" servlet/JSP engines.
page
This is simply a synonym for this, and is not very useful in Java. It was created as a placeholder for the time when the scripting language could be something other than Java.
Popular Posts
-
What Is Visual Basic and Why do I need it? Visual Basic is Easy to learn Programming language. With Visual Basic you can develop Windows bas...
-
XML Web Services A Web Service (XML Web Service) is a unit of code that can be activated using HTTP requests. Stated another way, a Web Serv...
-
Getting Started (Continue) Look at the form with the title bar Form1. This is how your program will look like. Everything you will place on ...
-
As you may already know, the C++ Standard Library implements a powerful string class, which is very useful to handle and manipulate strings ...
-
A JSP expression is used to insert Java values directly into the output. It has the following form: <%= Java Expression %> The Java ex...
-
In the previous chapter, you learned how to connect to SQL Server Database Server . In this chapter, you can find more about how to use Mana...
-
Learning about Properties Every component (form is component for example) has properties, that determine its look and its functioning. Prope...
-
.NET is a "Software Platform". It is a language-neutral environment for developing rich .NET experiences and building applications...
-
The .NET Framework offers a number of advantages to developers. The following paragraphs describe them in detail. Consistent Programming Mod...
-
request This is the HttpServletRequest associated with the request, and lets you look at the request parameters (via getParameter), the requ...
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment