--> We had to change it in a way that also the views change
1) In the cas properties instead of telling the real name of the views I want to see just direct in any case to some defualt view like this cas.viewResolver.basename=views-default
2) Under src/main/webapp/WEB-INF/classes add one property file for each theme you want to use afterwards
3) In this files just add one more property (beside the ones that are already there by default)
theme.view=/WEB-INF/view/jsp/theme1/ui/When the structure of your views is still like the one from default it should point perfektly to the views of theme1 in this example
4) Now change the default views e.g. src/main/webapp/WEB-INF/view/jsp/default/ui/casLoginView.jsp to the following
<%@ page contentType="text/html; charset=UTF-8" %>
<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<spring:theme code="theme.view" var="theme"></spring:theme>
With this definition now the casLoginView.uses the view defined by the theme.view property in cas-theme-themeX.properties. file.
And now how to change the property file? Just use the Services GUI (e.g. https://login.cas.net/cas/services/manage.html) and enter there the name of the theme for the various services. And that's actually the power of the solution. Now you can define one default theme for your server and a lot of "real" themes for the various services that use you're CAS.
Of course it is a change in the basic logic of CAS, however it is reversable in a few steps if one day changing the basic CSS would be enough
By default the theme names are cas-theme-xxx which is at least 10 chars long. The default implementation of the CAS Serive Managemant GUI allows theme names with a maximum length of 10, so change the add.jsp to allow the longer names