question:
When a user logs on to the system, assigns a session object to the currently logged-on user. Used to store this user-related
(1) User information: User ID, user name, user password, user location, etc.;
(2) Users can be governed by the Company (User data Rights Management: The current logged-on user can only view the driver information under their own company): Multiple company ID,
separated by commas.
After you use session, you can read the data for related operations in other JSP pages or in the controller class of the project.
Implementation method:
1. When the user login successfully, will (1) user information, (2) can be governed by the company information in the session
(1) Store user information in session
(2) storing the information of the competent company in the session
2. Read the user information in the session in the project's controller class
Use the GetSession method in Basesession.java to get the session of the currently logged-on User:
3. Read the session's governing company information in the project's JSP page
Expand your reading: 1. A great introduction to the session of the aloof Wolf: http://www.cnblogs.com/xdp-gacl/p/3855702.html