[NEWSENDER] - Re: About the theme function - Message is from an unknown sender

Li Wei Nan liweinan at chinaedu.net
Tue Jul 29 11:05:35 EDT 2008


Sorry I still cannot get it work. Following the instruction on wiki,  
just the default theme will works. But the run-time configuration  
won't work.


Here are all my configuraions:

  1. in cas-servlet.xml:
  <!-- Theme Resolver -->
         <bean id="themeResolver"  
class="org.jasig.cas.services.web.ServiceThemeResolver"
                 p:defaultThemeName="$ 
{cas.themeResolver.defaultThemeName}"
                 p:servicesManager-ref="servicesManager"
                 p:argumentExtractors-ref="argumentExtractors" />

         <!-- View Resolver -->
         <bean id="viewResolver" class="org.springframework.web.servlet.view.ResourceBundleViewResolver 
"
                 p:order="0">
                 <property name="basenames">
                         <list>
                                 <value>${cas.viewResolver.basename}</ 
value>
                                 <value>protocol_views</value>
                         </list>
                 </property>
         </bean>

2. in cas/WEB-INF/view/jsp: we have a new set of theme: theme1

.
|-- brokenContext.jsp
|-- default
|   `-- ui
|       |-- casConfirmView.jsp
|       |-- casGenericSuccess.jsp
|       |-- casLoginView.jsp
|       |-- casLogoutView.jsp
|       |-- includes
|       |   |-- bottom.jsp
|       |   `-- top.jsp
|       |-- serviceErrorSsoView.jsp
|       `-- serviceErrorView.jsp
|-- errors.jsp
...
`-- theme1
     `-- ui
         |-- casConfirmView.jsp
         |-- casGenericSuccess.jsp
         |-- casLoginView.jsp
         |-- casLogoutView.jsp
         |-- includes
         |   |-- bottom.jsp
         |   `-- top.jsp
         |-- serviceErrorSsoView.jsp
         `-- serviceErrorView.jsp

3. in cas.properties:
...
cas.themeResolver.defaultThemeName=default
cas.viewResolver.basename=default_views

#cas.themeResolver.defaultThemeName=theme1
#cas.viewResolver.basename=theme1_views
...

4. In service management console, I set the theme for : http://172.16.1.201 
*/** to 'theme1'

5. When I access this app server, it redirect me to CAS: https://edupass.chinaedu.net/cas/login?service=http%3A%2F%2F172.16.1.201%2Fdiscuz%2FEdu_login.php%3Faction%3Dlogin

But I still get the default theme.

I don't use any style sheet so I don't have <spring:theme ..> tag in  
new theme.

What I'm doing wrong?


- Li Wei Nan





On Jul 29, 2008, at 10:25 PM, Li Wei Nan wrote:

> I've found the way on wiki: http://www.ja-sig.org/wiki/display/CASUM/Theme+Control
> Sorry for the noise
> - Li Wei Nan
>
>
>
>
>
> On Jul 29, 2008, at 10:07 PM, Li Wei Nan wrote:
>
>> I think I've enabled ServiceThemeResolver by adding:   
>> p:servicesManager-ref="servicesManager" to it.
>>
>> Maybe I misunderstand the theme function at all. I thought to  
>> enable a theme to an application at run-time, it should be:
>>
>> 1. enable the ServiceThemeResolver
>> 2. just make a theme like 'default' or 'simple' and put in same  
>> directory structure.
>> 3. make a new property file in 'clasess' dir, like  
>> theme1_view.properties
>> 4. set the new theme to application in management console of CAS.
>>
>> And now it seems if I want to provide different theme to different  
>> services at run-time, the actual step should be:
>>
>> 1. enable the ServiceThemeResolver
>> 2. set the new theme to application in management console of CAS.
>> 3. enable the Spring ThemeResolver bean in context, such as  
>> SessionThemeResolver
>> 4. modify the current 'default' theme, make all elements conform to  
>> spring theme tag <spring:theme ...>
>> 5. and then made two sets of theme sets. One is the previous  
>> 'default' one, and the other is the new one. But all is conforming  
>> to spring theme scheme.
>>
>> It that correct?
>>
>> - Li Wei Nan
>>
>>
>>
>>
>>
>> On Jul 29, 2008, at 9:40 PM, Scott Battaglia wrote:
>>
>>> Hi,
>>>
>>> Did you enable the ServiceThemeResolver?  Also, your JSP pages  
>>> would need to use the Spring Theme tags to resolve to the  
>>> appropriate theme.
>>>
>>> Basic information about the theme stuff can be found in Spring's  
>>> documentation.
>>>
>>> -Scott
>>>
>>> -Scott Battaglia
>>> PGP Public Key Id: 0x383733AA
>>> LinkedIn: http://www.linkedin.com/in/scottbattaglia
>>>
>>>
>>> On Tue, Jul 29, 2008 at 6:16 AM, Li Wei Nan  
>>> <liweinan at chinaedu.net> wrote:
>>> Hi All,
>>>
>>> 	I'm now deploying a different theme for our companies wired-in  
>>> application now and meet some problem. Our application needs a CAS  
>>> login theme that is different from the default one.
>>>
>>> 	What I'm doing is:
>>>
>>> 	- make a copy of default theme
>>> 		-in cas/WEB-INF/view/jsp/: cp -r default theme1
>>> 		-in cas/themes: cp -r default theme1
>>> 	- in the new theme 'theme1', we made some modifcations to the style
>>> 	- in cas management console(/services/manage.html), set the theme  
>>> of this app to 'theme1'
>>>
>>> 	After all these done, and when we use the Application and getting  
>>> redirected to CAS, it still uses the default theme. Can anyone  
>>> help me?
>>>
>>>
>>> - Li Wei Nan
>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Yale CAS mailing list
>>> cas at tp.its.yale.edu
>>> http://tp.its.yale.edu/mailman/listinfo/cas
>>>
>>>
>>> _______________________________________________
>>> Yale CAS mailing list
>>> cas at tp.its.yale.edu
>>> http://tp.its.yale.edu/mailman/listinfo/cas
>>
>> _______________________________________________
>> Yale CAS mailing list
>> cas at tp.its.yale.edu
>> http://tp.its.yale.edu/mailman/listinfo/cas
>
> _______________________________________________
> Yale CAS mailing list
> cas at tp.its.yale.edu
> http://tp.its.yale.edu/mailman/listinfo/cas

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://tp.its.yale.edu/pipermail/cas/attachments/20080729/454004fc/attachment.html 


More information about the cas mailing list