First, you need to know the client jumps and server differences:
Client Jump: Response.sendredict (String Path), the address bar has changed.
The request property cannot be passed.
Server side jump:<jsp:forward> Address bar does not change. Can pass the request property.
Request attribute scope: Only after the server side jumps, the contents of all settings will be stopped.
Session Property Scope: Whether it is a client jump or server-side jump, only if it is a property set can be obtained.
1:page: (PageContext)
Save properties on only one page. Invalid after jump.
Indicates that a property is set on this page and is not valid after a jump.
After jumping through <jsp:forward>server (the address bar does not change ). property cannot be obtained!
2:request:
After the server jump (<jsp:forward>) is valid;
The properties set by the request via hyperlink (<a href= "" ></a>) are not available;
The Request property is used more in MVC design mode.
watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvc2hpewvxawfuz2xkaa==/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma== /dissolve/70/gravity/southeast ">
3:session:
In another session, no matter what jumps can be used, but the new browser can not be used;
To be able to make any other page related to the Settings page;
Properties can also be obtained in hyperlinks (hyperlink address bar changes, which belong to the client jump).
Each new browser connects to the server and is a new session. So the new browser is unable to get the session properties.
4:application:
Save on the entire server, all users can use;
Regardless of how many new browser application properties are available, once the server is started again, the previously set properties will all disappear.
Copyright notice: This article blog original articles, blogs, without consent, may not be reproduced.
JAVA Web four properties for a range rollup