I'm saying the former. We're using standard Spring here so it operates the same way it would for any other Spring application.
On Mon, Jun 9, 2014 at 8:23 PM, Zac Harvey <[email protected]> wrote: > Thanks again Scott, however after reading that README.txt I'm even more > confused now! > > > Are you saying that I could define my FizzBuzz bean inside, say, > widget.xml, and the web.xml config (which looks for contextConfigLocations > in spring-configuration/*.xml) will find widget.xml, read my FizzBuzz bean > out of it, and then make it available to the entire app's context? > > > Or are you saying that I need to make a fizzBuzz.xml file, define a > FizzBuzz bean (with an id of "fizzBuzz") inside it, in order to make it > available to the entire app's context? Thanks again for any clarification > here! > ------------------------------ > *From:* Scott Battaglia <[email protected]> > *Sent:* Monday, June 9, 2014 4:53 PM > > *To:* [email protected] > *Subject:* Re: [cas-user] What Spring beans are available to CAS JSP > pages? > > CAS loads any Spring configuration file that matches the list here: > > https://github.com/Jasig/cas/blob/master/cas-server-webapp/src/main/webapp/WEB-INF/web.xml#L31 > > It will load all files under /spring-configuration If you name-collide > with anything in the directory then you will override. Otherwise its > addative. > > You can read more about it here: > > https://github.com/Jasig/cas/blob/master/cas-server-webapp/src/main/webapp/WEB-INF/spring-configuration/README.txt > > > > > On Mon, Jun 9, 2014 at 4:05 PM, Zac Harvey <[email protected]> > wrote: > >> Thanks Scott, I guess I asked the wrong questions here :-) >> >> >> >> To create my CAS project, I created a $PROJECT_HOME/pom.xml and used the >> POM example from the CAS 4.0 manual. Then I ran mvn clean package and it >> produced a simple $PROJECT_HOME/target/cas.war for me. I then created a >> src/main/webapp/WEB-INF/spring-configuration directory. What I’m wondering >> is this: >> >> >> >> Does CAS use applicationContext.xml (the Spring standard) for wiring >> Spring beans? If so, if I add my own applicationContext.xml under my >> newly-created spring-configuration/ directory, will it override (blow out) >> or automagically-merge with the applicationContext.xml used under the hood >> by CAS? And, if CAS doesn’t use its own applicationContext.xml, then what >> file does it use, and how do I extend-without-blowing-out this file? >> Thanks again! >> >> >> >> *From:* Scott Battaglia [mailto:[email protected]] >> *Sent:* Monday, June 09, 2014 3:59 PM >> *To:* [email protected] >> *Subject:* Re: [cas-user] What Spring beans are available to CAS JSP >> pages? >> >> >> >> You should be able to add as many additional configuration files as you >> want. >> >> >> >> With respect to referencing the bean from the JSP, you should refer to >> the Spring documentation (which will most likely be more accurate than any >> information I would give you) >> >> >> >> On Mon, Jun 9, 2014 at 8:55 AM, Zac Harvey <[email protected]> >> wrote: >> >> I want a custom org.my.FizzBuzz Java class that I need to configure in >> CAS’ applicationContext.xml and would like to have access to it in the >> casLogoutView.jsp page. So in the app context, the wiring might look >> something like: >> >> >> >> <bean id=”fizzBuzz” class=”org.me.FizzBuzz”> >> >> <property name=”foo” ref=”foo” >> >> </bean> >> >> >> >> etc. And then in the casLogoutView.jsp, something like: >> >> >> >> <% >> >> FizzBuzz fizzBuz = >> (FizzBuzz)applicationContext.getBean(“fizzBuzz”); >> >> >> >> // Do stuff with fizzBuzz. >> >> %> >> >> >> >> My questions: >> >> >> >> (1) In my spring-configuration/ directory, there is no >> applicationContext.xml. If I add one, and only define this one FizzBuzz >> bean (and its dependencies), will that “blow out” all of the other beans >> that CAS is defining/injecting underneath the hood? If so, how can I >> define my FizzBuzz (in any XML) so that it’s available to the JSP? >> >> >> >> (2) How can I obtain a reference to applicationContext and/or my FizzBuzz >> bean inside the JSP? >> >> >> >> Thanks in advance! >> >> -- >> >> 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 >> >> > -- > 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
