The last component associated with the JSP syntax is called an internal object. Within the JSP small instruction file, you can access these internal objects to interact with the servlet environment that performs JSP Web pages. Many of the access to internal objects should be simplified. However, these are examples, their access is acceptable, and the need to fully utilize the internal object settings requires an understanding of the latest Java Servlet APIs.
The following table lists the internal objects you can use.
Internal Object Description
Request client requests that this request contain parameters from the Get/post request
Response Web page Returns the response of the client
The properties of the PageContext Web page are managed here
Session with request-related sessions
What the application servlet is doing
Out the output stream used to transmit the response
Config servlet schema Object
PAGEJSP Web page itself
Exception for error pages, not captured exceptions
So, what do these do, and how do you use them? Basically, in your small instruction file, you can use them to access the servlet that executes the JSP program code. To avoid talking about the details of too many servlet APIs, let's examine some of the things you can do with them:
Instead of using an expression, you can directly access an internal out object to print something to response:
<% out.println ("Hello"); %>.
You do not have to send parameters directly to JavaBean, you can get the value of the parameter by requesting the object:
<% String name=request.getparameter ("name"); OUT.PRINTLN (name); %>.
When you write a lot of apps in JSP, if you build JavaBeans or find yourself putting too many Java primitives into your JSP files, you need to build supported Java classes that encourage reuse and reduce the time it takes to convert JSP pages. When you need to build a Java class, you must:
Add the JDSWK installation directory in directory to your path. At the end of the path to your Autoexec.bat file, join c:1.2.2in.
Copy the jar file to the Jrelibext directory with the following instructions:
Copy C:jswdk-1.0.1libservlet.jar C:jdk1.2.2jrelibext.