Page,request,session,application Scope in JSP

Source: Internet
Author: User

1. Simply say page refers to the current screen. In a JSP page, the variables in the page cannot be passed from index.jsp to test.jsp. As soon as the page jumps, they are gone.
2.request refers to the entire process of returning a response from an HTTP request to the end of the server processing. Use the forward method to jump through multiple jsps during this process. You can use this variable on these pages. The variables in the request can span two pages before and after forward. But as soon as you refresh the page, they recalculate.
3.Session valid range current session, from browser open to browser close this process. The variables in the session always accumulate, and at the beginning there is no difference, as long as you close the browser and restart the browser to access the page again, the variables in the session are recalculated.
4.application its effective range is the entire application. The variables in the scope, they survive the longest, if not manually deleted, they can always be used, the variables in the application are always accumulating, unless you restart Tomcat, it will continue to grow.

Page,request,session,application Scope in JSP

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.