Just to summarize the background of the issue: - Prior to Fedora 3.5.0, you were able to run Fedora within Jetty 1) without defining the FEDORA_HOME environment variable 2) only using relative paths to define the fedora.home property in web.xml (https://github.com/projecthydra/hydra-jetty/blob/master/webapps/fedora/WEB-INF/web.xml#L11)
This allows for a portable Jetty with Fedora inside as well as running multiple Fedora webapps in a single container. I've created a branch (fedora3.5.0rc) of hydra-jetty that has Fedora 3.5.0 and a web.xml that defines three context-params that correspond to the params defined in tomcat/conf/Catalina/localhost/fedora.xml. Instructions for testing hydra-jetty: a) Ensure you've unset the FEDORA_HOME environment variable if you have it set (e.g. "export FEDORA_HOME=") b) Clone hydra-jetty, switch to the fedora3.5.0rc branch and run "java -jar start.jar". Startup should fail with FileNotFound errors. If you use absolute paths for the context-param values in hydra-jetty/webapps/fedora/WEB-INF/web.xml, Fedora should start correctly. On 20 Jul 2011, at 10:40 AM, Asseg, Frank wrote: > Hola Guys, > > After reading up a bit and looking through the fcrepo-webapp-fedora > web.xml, here are the three different fixes for loading spring configs > from outside of the WEB-INF directory i could come up with: > > 1.) import the server's context using > <import resource="file:${FEDORA_HOME}/server/config/spring"> > in src/main/webapp/WEB-INF/applicationContext.xml > Pro: quick, no new implementation, easy to configure > Con: ugly, and not really a relative path. > > > 2.) implement ConfigurableWebApplicationContext from Spring and use > <context-param> > <param-name>contextClass</param-name> > <param-value>MyWebapplicationContext</param-value> > <context-param> > in src/main/webapp/WEB-INF/web.xml. This will have Spring's > ContextLoader use the set contextClass as an ApplicationContext. > This is basically the ResourceLoader idea from the commiter's meeting. > Pro: only relative paths for configuration files, since the > implementation could know where to look for the files (i.e. FEDORA_HOME). > Con: work. > > > 3.) pack the spring configuration files into the server jar by adding > the xml files as resources in the maven pom.xml, so they will be > automatically put into the resulting jar file when build. Then spring > will be able to locate server spring configuration files in the classpath. > Pro: quick, no new implementation, no paradigms would be broken > Cons: the configs are in a jar and harder to manipulate > > > imho and in light of https://jira.duraspace.org/browse/FCREPO-504 i'd > say the third approach seems most atractive to me, since it also > complies with the best practice of having all the configuration of a > webapp in WEB-INF. > > regards, > > frank > > > -- > Frank Asseg > ePublishing & eScience > Development & Applied Research > Phone +49 7247-808-515 > Fax +49 7247 808-133 > frank.as...@fiz-karlsruhe.de > > > FIZ Karlsruhe – Leibniz Institute for Information Infrastructure > Hermann-von-Helmholtz-Platz 1 > 76344 Eggenstein-Leopoldshafen, Germany > > http://www.fiz-karlsruhe.de/ > > > ------------------------------------------------------- > > Fachinformationszentrum Karlsruhe, Gesellschaft für > wissenschaftlich-technische Information mbH. > Sitz der Gesellschaft: Eggenstein-Leopoldshafen, Amtsgericht Mannheim HRB > 101892. > Geschäftsführerin: Sabine Brünger-Weilandt. > Vorsitzender des Aufsichtsrats: MinDirig Dr. Thomas Greiner. > > ------------------------------------------------------------------------------ > 10 Tips for Better Web Security > Learn 10 ways to better secure your business today. Topics covered include: > Web security, SSL, hacker attacks & Denial of Service (DoS), private keys, > security Microsoft Exchange, secure Instant Messaging, and much more. > http://www.accelacomm.com/jaw/sfnl/114/51426210/ > _______________________________________________ > Fedora-commons-developers mailing list > Fedora-commons-developers@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/fedora-commons-developers ------------------------------------------------------------------------------ 10 Tips for Better Web Security Learn 10 ways to better secure your business today. Topics covered include: Web security, SSL, hacker attacks & Denial of Service (DoS), private keys, security Microsoft Exchange, secure Instant Messaging, and much more. http://www.accelacomm.com/jaw/sfnl/114/51426210/ _______________________________________________ Fedora-commons-developers mailing list Fedora-commons-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fedora-commons-developers