From: <mg...@us...> - 2006-08-31 16:47:44
|
Revision: 109 http://svn.sourceforge.net/obo/?rev=109&view=rev Author: mgibson Date: 2006-08-31 09:47:35 -0700 (Thu, 31 Aug 2006) Log Message: ----------- servlet now loads config file from web.xml as it should - was hardwired - fix came from christian Modified Paths: -------------- phenote/trunk/src/java/phenote/servlet/PhenoteServlet.java phenote/trunk/src/web/web.xml Modified: phenote/trunk/src/java/phenote/servlet/PhenoteServlet.java =================================================================== --- phenote/trunk/src/java/phenote/servlet/PhenoteServlet.java 2006-08-31 16:16:00 UTC (rev 108) +++ phenote/trunk/src/java/phenote/servlet/PhenoteServlet.java 2006-08-31 16:47:35 UTC (rev 109) @@ -17,10 +17,14 @@ import phenote.datamodel.OntologyManager; import phenote.datamodel.SearchParamsI; import phenote.util.HtmlUtil; +import phenote.config.Config; import phenote.gui.Phenote; // move to main package public class PhenoteServlet extends HttpServlet { + private static final String CONFIG_FILE_PARAM = "configuration-file"; + + //private String configurationFileName; not sure needs to be var private Date initDate; private Phenote phenote; @@ -33,9 +37,12 @@ // makes links for term info - put this method in Phenote? HtmlUtil.setStandAlone(false); phenote = Phenote.getPhenote(); + // from web.xml + String configurationFileName = getInitParameter(CONFIG_FILE_PARAM); + Config.inst().setConfigFile(configurationFileName); // causes parse of file // cheesy - revisit - String[] args = {"-c","initial-zfin.cfg"}; - phenote.initConfig(args); // hardwire for now to zfin + //String[] args = {"-c","initial-zfin.cfg"}; + //phenote.initConfig(args); // hardwire for now to zfin phenote.initOntologies(); // this is not running as a separate thread - investigate // System.out.println("ontologies loaded - starting file checking thread"); Modified: phenote/trunk/src/web/web.xml =================================================================== --- phenote/trunk/src/web/web.xml 2006-08-31 16:16:00 UTC (rev 108) +++ phenote/trunk/src/web/web.xml 2006-08-31 16:47:35 UTC (rev 109) @@ -7,6 +7,14 @@ <servlet> <servlet-name>Phenote</servlet-name> <servlet-class>phenote.servlet.PhenoteServlet</servlet-class> + <init-param> + <param-name>"-Xmx"</param-name> + <param-value>200M</param-value> + </init-param> + <init-param> + <param-name>configuration-file</param-name> + <param-value>/initial-zfin.cfg</param-value> + </init-param> <load-on-startup>1</load-on-startup> </servlet> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |