Here’s my propertyFileConfigurer.xml file in the spring-configuration directory:
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd"> <description> This file lets CAS know where you've stored the cas.properties file which details some of the configuration options that are specific to your environment. You can specify the location of the file here. You may wish to place the file outside of the Servlet context if you have options that are specific to a tier (i.e. test vs. production) so that the WAR file can be moved between tiers without modification. </description> <bean id="propertyPlaceholderConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer" p:location="file:${catalina.base}/conf/cas.properties" /> </beans> Jonathan Liedy Middleware Administrator The Florida State University 2035 East Paul Dirac Drive Sliger, Suite 113 Tallahassee, FL 32310 jli...@fsu.edu<mailto:jli...@fsu.edu> Voice: (850) 270-7368 From: s4...@yahoo.co.jp [mailto:s4...@yahoo.co.jp] Sent: Tuesday, August 28, 2012 8:56 PM To: cas-user@lists.jasig.org Subject: [cas-user] Reading cas.properties file from login-webflow Problem: I have a URL in cas.properties file and I want to read it from within the login-webflow.xml and pass that value to some bean (java file). CAS server version 3.4.10 My login-webflow begins with: <flow xmlns="...." Inside that "flow", I want to add these two lines: //--------------------------------------------------- xmlns:context="http://www.springframework.org/schema/context" http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd"> //------------------------------------------------------------- Those two lines should have allowed (that's what I thought) me to use the following: <context:property-placeholder location="file:${WEB-INF}/cas.properties"/> But no, not so fast. I get this error: //-------------------- cvc-complex-type.2.4.a: Invalid content was found starting with element 'context:property-placeholder'. One of '{"http://www.springframework.org/schema/webflow":action-state, "http://www.springframework.org/schema/webflow":view-state, ..... //-------------------- Inside one of the "action-states", I have this piece of code: <evaluate expression="new String('${parentCASUrl}')" result="externalContext.sessionMap.parentCASServer" /> In my cas.properties file, I have this code: parentCASUrl=https://parent1.com I want to keep all my values like DB connection strings, user name, passwords, URLs of different servers, etc, in a separate (=cas.properties) file, and read it from within program. Can someone give me some pointers? Thanks. -- You are currently subscribed to cas-user@lists.jasig.org<mailto:cas-user@lists.jasig.org> as: jli...@fsu.edu<mailto:jli...@fsu.edu> To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user -- You are currently subscribed to cas-user@lists.jasig.org as: arch...@mail-archive.com To unsubscribe, change settings or access archives, see http://www.ja-sig.org/wiki/display/JSG/cas-user