Another possible way is to use CAS themes. 
See https://wiki.jasig.org/display/CASUM/Theme+Control

In your JSP, you can then use it like this:

<c:set var="themeName"><spring:theme code="name"/></c:set>
….

<c:choose>
  <c:when test="${themeName == 'uportal'}">
   <spring:message code="screen.welcome.uportal"/>
 </c:when>
  <c:when test="${themeName == 'moodle'}">
   <spring:message code="screen.welcome.moodle"/>
 </c:when>
  <c:otherwise>
    <spring:message code="screen.welcome.default"/>
  </c:otherwise>
</c:choose>

Am 05.06.2013 um 16:05 schrieb James Sumners <[email protected]>:

> Here's a snippet from my casLoginView.jsp that does something similar to what 
> you want:
> 
> <div id="sidebar">
>  <div class="sidebar-content">
>    <%final String serviceUrl = request.getParameter("service");%>
>    <c:set var='serviceUrl' value='<%=serviceUrl%>'/>
> 
>    <p class="fl-panel fl-note fl-bevel-white fl-font-size-80"><spring:message
>        code="screen.welcome.security"/></p>
> 
>    <c:if test="${serviceUrl != null && fn:length(serviceUrl) > 0}">
>      <style scoped="scoped">
>        #targetUrl {
>          font-weight: bold;
>        }
>      </style>
>      <p>
>        After logging in you will be re-directed to <span 
> id="targetUrl">${serviceUrl}</span>
>      </p>
>    </c:if>
>  </div>
> </div>
> 
> 
> On Jun 4, 2013, at 7:51 PM, Ananda <[email protected]> wrote:
> 
>> 
>> Hi, I am running CAS 3.5.0.  I would like to display a modified version of 
>> the login template if a certain app/url is requesting the login.
>> 
>> The way I was thinking to do it is to learn some jsp, modify 
>> src/main/webapp/WEB-INF/view/jsp/default/ui/casLoginView.jsp
>> so if ${loginUrl} = "login?service=#url.iwant.edu#", then display specific 
>> message.. "hey I see you are trying to login to [uPortal, moodle,etc].."
>> 
>> Is this a valid way to do it? Is there a better way?
>> 
>> Sorry if this has been answered already, I skimmed the new archive and the 
>> old archive seems to not be working.
>> -- 
>> 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
> 


-- 
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

Reply via email to