The last component related to JSP syntax is called an internal object. in a small JSP instruction file, you can access these internal objects to interact with the servlet environment that executes JSP pages. Access to many internal objects should be simplified. However, these are examples and their access is acceptable. to fully utilize the internal object settings, the last component related to the JSP syntax of the latest assumervletapi is called an internal object. in a small JSP instruction file, you can access these internal objects to interact with the servlet environment that executes JSP pages. Access to many internal objects should be simplified. However, these are examples, and their access is acceptable. to fully utilize internal object settings, you need to understand the latest Java Servlet API.
The following table lists the internal objects you can use.
Internal object description
Request client request, which contains parameters from the GET/POST request
Response returned from the response webpage to the client
The pageContext page is managed here.
Session related to the request
Content being executed by application servlet
Output stream used to send response
Config servlet architecture object
Page JSP page itself
Exception for the error webpage, exceptions not captured
So what are these, and how should you use them? Basically, in your small instruction file, you can use them to access the servlet that executes JSP code. To avoid talking about too many details about Servlet APIs, let's examine what you can do with them:
Without expressions, you can directly access the internal out object to print something to response:
<% Out. println ("Hello"); %>.
You do not need to directly transmit parameters to JavaBean. you can obtain the parameter values through the request object:
After you write a lot of applications using JSP, if you create a JavaBeans or find that you put too many original Java codes into your JSP file, you need to create a supported Java category to encourage repeated use and reduce the time required for JSP page conversion. To create a Java class, you must:
Add the JDSWK installation directory \ bin directory to your PATH. Add C: \ 1.2.2 \ bin; at the end of the PATH line of your autoexec. bat file ;.
Run the following command to copy the JAR file to the \ jre \ lib \ ext Directory:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service