> IIRC the last time this changed was in 3.1. 4.0 and 3.1 should be the same in > this respect.
I wrote my code a couple of versions back. This is the second change is location for me so far. (1. dir defined in web.xml, and then 2. in the top level WEB-INF/lib dir) > "configuration-location" init parameter.” This was mentioned in the docs. Is this not good practice? I would *prefer* to put them in a separate directory under “classes”. Is there a better way to do this - in your experience? Thanks, Joe > On Jul 5, 2015, at 8:37 PM, Andrus Adamchik <and...@objectstyle.org> wrote: > > IIRC the last time this changed was in 3.1. 4.0 and 3.1 should be the same in > this respect. > > All XML file locations are relative to CLASSPATH, regardless of whether you > are using CayenneFilter or not. CayenneFilter simply creates a ServerRuntime > with location parameter, so everything we say about ServerRuntime behavior is > applicable to CayenneFilter. So in a .war you would put the Cayenne XML files > under WEB-INF/classes or in any of the .jar files under WEB-INF/lib/. > > Andrus > >> On Jul 5, 2015, at 7:56 PM, Joe Baldwin <jfbald...@earthlink.net> wrote: >> >> While migrating to 4.0, I have found that the config files assoicatated with >> the filter cannot be located. It appears that the location rules have >> changed again. >> >> This doc >> >> >> https://cayenne.apache.org/docs/4.0/cayenne-guide/starting-cayenne.html#webapps >> >> says: >> >> "When started by the web container, it creates a instance of ServerRuntime >> and stores it in the ServletContext. Note that the name of Cayenne XML >> project file is derived from the "filter-name". In the example above >> CayenneFilter will look for an XML file "cayenne-project.xml". This can be >> overridden with "configuration-location" init parameter.” >> >> But there is no example, and it is not clear how all of the config files are >> located. >> >> Is there an example of where to store and locate these using the web.xml >> filter? >