Device Resource Management System-Verification Code
- Used for Logon operations
Operation:
1. Obtain the four numeric values stored in the verification code from the session object of image. jsp.
* If the retrieved value is null, you cannot log on to the system and return index. jsp.
2. Obtain the value of the Verification Code text box from the page.
* If the obtained value is null, you cannot log on to the system. index. jsp is returned.
3. Determine whether the session value obtained from image. jsp is equal to the request value obtained on the page.
* If not, you cannot log on to the system. The system returns index. jsp.
4. If both 1, 2, and 3 are successfully verified, log on to the system.
Operation:
1. Get the value of name and password from the request object
2. Create two cookies to store the name and password values respectively.
3. Set the absolute path of the cookie and define it as the path of the Project root directory.
4. Obtain the value of the check box from the request object on the page.
* If the check box is selected, set the cookie validity period.
* If the check box is not selected, clear the cookie validity period.
5. Use the response object to store the current two cookies.