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. These are examples, however, where access is acceptable, and the full use of internal object settings is an understanding of the latest Java Servlet APIs.
The following table lists the internal objects you can use.
Internal Object Description
Request client, this request contains 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 call period
What the application servlet is doing
Out output stream used to transmit the response
Config servlet schema Object
Page JSP pages themselves
Exception for error pages, not captured exceptions
So, what do these do, and how do you use them? Basically, in your small command file, you can use them to access the servlet that executes the JSP 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 a formula, 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 a JavaBeans or find yourself putting too many Java primitives into your JSP files, you need to build a Java class that supports it, which encourages reuse and reduces the time it takes to convert JSP pages. When you want to build a Java class, you must:
Add the JDSWK installation directory \ Bin directory to your path. At the end of the path to your Autoexec.bat file, join C:\1.2.2\bin.
Copy the jar file to the \jre\lib\ext directory with the following instructions:
Copy C:\jswdk-1.0.1\lib\servlet.jar C:\jdk1.2.2\jre\lib\ext.