1. Please describe the difference between GET request and Post request in HTTP protocol.
(1) Get data from the server, post is send data to the server.
(2) Get pass parameters via URL, post through the body in request.
(3) The parameters passed by the GET request in the URL are limited in length (mainly because the browser has a limit on the length of the URL), while Post does not.
(4) Get is less secure than post because parameters are exposed directly to the URL, so it cannot be used to pass sensitive information.
-
Get requests can only be URL-encoded, while post supports multiple encoding methods
-
The GET request will be the browser active cache, while post supports multiple encoding methods.
-
The GET request parameters are kept intact in the browsing history, and the parameters in the post are not retained.
2. Please describe the area of the session and the cookie.
(1) The cookie data is stored on the client's browser and the session data is placed on the server.
(2) Cookies are not very secure and others can analyze cookies stored locally and make cookie spoofing
Consider that security should use the session.
3. Session will be saved on the server for a certain period of time. When access is increased, it will be more likely to occupy your server's performance
The cookie should be used in consideration of mitigating server performance.
4, a single cookie can not save more than 4K of data, many browsers restrict a site to save up to 20 cookies.
3. Briefly describe the relationship between Servlet and JSP
What are the 4.JSP built-in objects and their respective roles?
5. Describe your understanding of Java encapsulation, inheritance, polymorphism.
6. Write out 2 common design patterns (pseudo-code) and briefly describe the application scenario.
7.HashMap and Hashtable differences.
The difference between 8.HashSet and TreeSet.
The difference between 9.ArrayList and LinkedList.
The difference between 10.== and equals.
11. Briefly describe the generic, reflection, annotated application scenarios and the respective issues that were addressed.
What are the methods of the 12.Thread class, and how to implement thread synchronization in many ways?
13 What is the difference between a process and a thread, and in what ways Java can create threads.
14. The existing student table structure (student-id,class-id,name), please write down the SQL statement that counts how many students are in each class.
15. If you are developing a system login program, please describe how you can remember the user name and password this operation, and how to implement?
16. In the view layer does not support the storage of cookies, the server does not support the session of the scene how to maintain user login status.
The difference between a cookie and a session:
1. The cookie data is stored on the client's browser and the session data is placed on the server.
2, the cookie is not very safe, others can analyze the cookie stored in the local and cookie deception
Consider that security should use the session.
3. Session will be saved on the server for a certain period of time. When access is increased, it will be more likely to occupy your server's performance
The cookie should be used in consideration of mitigating server performance.
4, a single cookie can not save more than 4K of data, many browsers restrict a site to save up to 20 cookies.
Java Surface question Finishing