Paul, That's right.
To get what you want / need (I needed it too for my own implementation), you need to create a properties file per "theme". Just as sping:message can get ... well ... messages for different locales, spring:theme gets them for themes. The difference being that if and when you configured a specific theme for one of your services, the theme resolver will automatically point to the correct theme. In my case the theme.properties file went into the WEB-INF\classes folder, just like the messages properties files. BTW. In case your theme contains language specific elements, the theme resolver also supports locales. (have a look at http://static.springsource.org/spring/docs/2.5.x/reference/mvc.html#mvc-themeresolver as referenced in the CAS-wiki) So basically all you would have to do is create that blah.properties folder and add one line to it: css=blah (that is, based on the hypothetical example) Do remember to modify the original jsp files to always take your theme into account, at least whenever necessary. It's somewhat bizarre that the ones packaged with CAS by default contain hardcoded links to themes. (and css in particular) Hans Paul Vitty schreef: > Hans, > > I have no additional .properties files added. I take it that when I > add a service and associate a theme through the service manager I must > add a .properties file to /WEB-INF/ ? > > Thanks > Paul > > > On 31/07/2009 19:58, "Hans De Bisschop" <[email protected]> wrote: > > <spring:theme code="css" /> would get the value of the variable > css from your configured theme.properties file and put it in there. > So in your example css=blah in a file called blah.properties ? > > Hans > > Vitty Paul schreef: > > Re: [cas-user] CAS theme resolver > > Perhaps I'm misunderstanding what the theme resolver does. I > have my login > page http://cas-server/cas/login - this would print out > /themes/default/cas.css, > > I've associated the theme blah to a service http://paul, so > I'd assume that > /themes/blah/cas.css would be output, assuming that I have > > /themes/<spring:theme code="css" />/cas.css > > Any ideas? > > Thanks > Paul > > > On 31/07/2009 19:19, "Marvin Addison" > <[email protected]> <mailto:[email protected]> > wrote: > > >> javax.servlet.jsp.JspTagException: Theme 'default': No > message found under > >> code 'css' for locale 'en_US'. > > > > Looks like you're loading the default theme, and don't have a > message > > named "css" in that theme. If you want to use the default > theme in > > some cases, you'll need to add that code to the default > theme. If you > > want to replace the default theme with your custom theme, > you'll need > > to investigate why the default theme is being used in your > test case > > instead of your custom one. > > > > M > > > > > -- > You are currently subscribed to [email protected] as: > [email protected] > To unsubscribe, change settings or access archives, see > http://www.ja-sig.org/wiki/display/JSG/cas-user -- You are currently subscribed to [email protected] as: [email protected] To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user
