Recently interested in Java, learned something, recorded some notes.
1. Compiled language explanatory language
Explanatory language does not produce a target program that can be executed directly
Compiling the new language will generate the corresponding machine code and target program
2. Java Reflection mechanism
3. Source code
Compile Intermediate Code OBJ
Connecting the consolidated obj file and library file to form an executable EXE file
Java Virtual machine Interpretation execution
4. Talk about the Session again
There is no definition for session sessions in the HTTP protocol, which is produced by various programming languages based on the stateless nature of the HTTP protocol. Its implementation is nothing more than a hash table on the server side, and the hash table key is the Cookie value passed to the browser named Jsessionid.
When you need to save a value to the session, the container performs the following steps:
A. Get the Jsessionid value, and if not, create a method that is request.getsession ().
B. The HttpSession object instance you get is the equivalent of a hash table where you can store data in the hash table (SetAttribute)
C. You can also get a value by getattribute
This Cookie, called Jsessionid, is automatically deleted when the browser is closed. Set the MaxAge value of the Cookie to 1 to achieve the effect that the browser turns off auto-delete.
First note these.
Java Learning Notes