Modify the cas login page -- server side

1. The login page of cas unified authentication is located in: cas directory /WEB-INF/view/jsp/default folder, of which ui/casLoginView.jsp is the login page

2. First we copy a default folder and rename it to myview

3. Then copy classes/default.properties to classes/mytheme.properties Open mytheme.properties and modify the path of the login page to the myview folder we copied. changed to:

4 Modify cas.viewResolver.basename =mytheme in the cas directory/cas.properties

At this point, we just made a copy of the login page and then pointed to this copy. Next, we can modify the copied page at will. The purpose of this is that if we want to restore it later, it is more convenient, and we only need to modify the reference.

Next we modify the casLoginView.jsp page:

The requirements of the modification are: the login form needs to be retained (but the style can be modified, although the form tag is prefixed, but the style is modified like the ordinary html tag, and all the information output can also be deleted such as < spring :message code=" screen.welcome.label.netid.accesskey" var="userNameAccessKey" />) but you must keep the user name, password input box and confirm button in the policy, and it is best to copy its label and modify its class attribute to modify the style, here My modified form is:

where the green box is my defined style

After the modification, restart the server and the login page becomes:

The above is a process for me to modify the login page. Please correct me if I have any mistakes.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326646276&siteId=291194637