title: Spring XML error: Could not resolve placeholder 'cas.server.host'
body: <p>I am trying to setup my Spring CAS.XML file but I dont know why the file is not seeing the values I have set in the file:</p>
  
  <p>Can someone please tell me what I am getting the following error:</p>
  
  <pre><code>2012-09-10 11:16:00,396 ERROR org.springframework.web.context.ContextLoader - Context initialization failed
  org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'requestSingleLogoutFilter' defined in ServletContext resource [/WEB-INF/spring/CAS-Local.xml]: Could not resolve placeholder 'cas.server.host'
      at org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:209)
  </code></pre>
  
  <p>if you look I do have the values setup at the end of the file...</p>
  
  <p>Here is my CAS-Local.xml file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
      xmlns:tx="http://www.springframework.org/schema/tx" xmlns:jdbc="http://www.springframework.org/schema/jdbc"
      xmlns:security="http://www.springframework.org/schema/security"
      xmlns:p="http://www.springframework.org/schema/p"
      xmlns:util="http://www.springframework.org/schema/util"
  
      xsi:schemaLocation="http://www.springframework.org/schema/beans 
                              http://www.springframework.org/schema/beans/spring-beans.xsd
                              http://www.springframework.org/schema/context 
                              http://www.springframework.org/schema/context/spring-context-3.1.xsd
                              http://www.springframework.org/schema/tx
                              http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
                              http://www.springframework.org/schema/jdbc
                              http://www.springframework.org/schema/jdbc/spring-jdbc-3.0.xsd
                              http://www.springframework.org/schema/security
                              http://www.springframework.org/schema/security/spring-security-3.1.xsd
                              http://www.springframework.org/schema/util 
                              http://www.springframework.org/schema/util/spring-util-3.1.xsd"&gt;
  
  
          &lt;security:http entry-point-ref="casEntryPoint"
          use-expressions="true"&gt;
          &lt;security:intercept-url pattern="/" access="permitAll" /&gt;
  
          &lt;security:intercept-url pattern="/index.jsp"
              access="permitAll" /&gt;
          &lt;security:intercept-url pattern="/cas-logout.jsp"
              access="permitAll" /&gt;
          &lt;security:intercept-url pattern="/casfailed.jsp"
              access="permitAll" /&gt;
  
          &lt;security:intercept-url access="hasRole('ROLE_MEMBER_INQUIRY')"
              pattern="/visit**" /&gt;
  
          &lt;security:custom-filter ref="requestSingleLogoutFilter"
              before="LOGOUT_FILTER" /&gt;
          &lt;security:custom-filter ref="singleLogoutFilter"
              before="CAS_FILTER" /&gt;
          &lt;security:custom-filter ref="casFilter"
              position="CAS_FILTER" /&gt;
  
  
          &lt;security:logout logout-success-url="/cas-logout.jsp" /&gt;
      &lt;/security:http&gt;
  
      &lt;security:authentication-manager alias="authManager"&gt;
          &lt;security:authentication-provider
              ref="casAuthProvider" /&gt;
      &lt;/security:authentication-manager&gt;
  
  
  
      &lt;security:ldap-server id="ldapServer"
          url="ldaps://dvldap01.uftwf.dev:636/dc=uftwf,dc=dev" manager-dn="cn=xxx,dc=uftwf,dc=dev"
          manager-password="xxx" /&gt;
  
      &lt;security:ldap-user-service id="userServiceLDAP"
          server-ref="ldapServer" user-search-base="ou=webusers"
          user-search-filter="(uid={0})" group-search-base="ou=groups"
          group-role-attribute="cn" group-search-filter="(uniqueMember={0})"
          role-prefix="ROLE_" /&gt;
  
      &lt;!-- This filter handles a Single Logout Request from the CAS Server --&gt;
      &lt;bean id="singleLogoutFilter" class="org.jasig.cas.client.session.SingleSignOutFilter" /&gt;
      &lt;!-- This filter redirects to the CAS Server to signal Single Logout should 
          be performed --&gt;
      &lt;bean id="requestSingleLogoutFilter"
          class="org.springframework.security.web.authentication.logout.LogoutFilter"
          p:filterProcessesUrl="/j_spring_cas_security_logout"&gt;
          &lt;constructor-arg
              value="https://${cas.server.host}/cas-server-webapp/logout" /&gt;
          &lt;constructor-arg&gt;
              &lt;bean
                  class="org.springframework.security.web.authentication.logout.SecurityContextLogoutHandler" /&gt;
          &lt;/constructor-arg&gt;
      &lt;/bean&gt;
  
      &lt;bean id="serviceProperties" class="org.springframework.security.cas.ServiceProperties"
          p:service="http://wcmisdlin07.uftmasterad.org:8080/SchoolVisitLocked/j_spring_cas_security_check"
          p:authenticateAllArtifacts="true" /&gt;
  
      &lt;bean id="casEntryPoint"
          class="org.springframework.security.cas.web.CasAuthenticationEntryPoint"
          p:serviceProperties-ref="serviceProperties"
          p:loginUrl="https://6dvews01.uftwf.dev:8443/cas-server-webapp/login" /&gt;
  
      &lt;bean id="casFilter"
          class="org.springframework.security.cas.web.CasAuthenticationFilter"
          p:authenticationManager-ref="authManager" p:serviceProperties-ref="serviceProperties"
          p:proxyGrantingTicketStorage-ref="pgtStorage"
          p:proxyReceptorUrl="/j_spring_cas_security_proxyreceptor"&gt;
          &lt;property name="authenticationDetailsSource"&gt;
              &lt;bean
                  class="org.springframework.security.cas.web.authentication.ServiceAuthenticationDetailsSource" /&gt;
          &lt;/property&gt;
  
          &lt;property name="authenticationFailureHandler"&gt;
              &lt;bean
                  class="org.springframework.security.web.authentication.SimpleUrlAuthenticationFailureHandler"
                  p:defaultFailureUrl="/casfailed.jsp" /&gt;
          &lt;/property&gt;
  
  
          &lt;property name="authenticationSuccessHandler"&gt;
              &lt;bean
                  class="org.springframework.security.web.authentication.SavedRequestAwareAuthenticationSuccessHandler"
                  p:defaultTargetUrl="/visit" /&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
      &lt;!-- NOTE: In a real application you should not use an in memory implementation. 
          You will also want to ensure to clean up expired tickets by calling ProxyGrantingTicketStorage.cleanup() --&gt;
      &lt;bean id="pgtStorage"
          class="org.jasig.cas.client.proxy.ProxyGrantingTicketStorageImpl" /&gt;
      &lt;bean id="casAuthProvider"
          class="org.springframework.security.cas.authentication.CasAuthenticationProvider"
          p:serviceProperties-ref="serviceProperties" p:key="casAuthProviderKey"&gt;
          &lt;property name="authenticationUserDetailsService"&gt;
              &lt;bean
                  class="org.springframework.security.core.userdetails.UserDetailsByNameServiceWrapper"&gt;
                  &lt;constructor-arg ref="userServiceLDAP" /&gt;
              &lt;/bean&gt;
          &lt;/property&gt;
  
  
  
          &lt;property name="ticketValidator"&gt;
              &lt;bean class="org.jasig.cas.client.validation.Cas20ServiceTicketValidator"&gt;
                  &lt;constructor-arg index="0"
                      value="https://6dvews01.uftwf.dev:8443/cas-server-webapp" /&gt;
              &lt;/bean&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  
      &lt;!-- Configuration for the environment can be overriden by system properties --&gt;
      &lt;context:property-placeholder
          system-properties-mode="OVERRIDE" properties-ref="environment" /&gt;
  
      &lt;util:properties id="environment"&gt;
          &lt;prop key="cas.service.host"&gt;wcmisdlin07.uftmasterad.org:8443&lt;/prop&gt;
          &lt;prop key="cas.server.host"&gt;6dvews01.uftwf.dev:8443&lt;/prop&gt;
      &lt;/util:properties&gt;
  &lt;/beans&gt;
  </code></pre>