- From: Jean-Guilhem Rouel via cvs-syncmail <cvsmail@w3.org>
- Date: Fri, 12 Sep 2008 18:01:53 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2006/unicorn/org/w3c/unicorn/tests In directory hutz:/tmp/cvs-serv11277/org/w3c/unicorn/tests Modified Files: FirstServlet.java Log Message: first version that works with Jigsaw + fixed a bug in cond handling + removed parse(InputStream) Index: FirstServlet.java =================================================================== RCS file: /sources/public/2006/unicorn/org/w3c/unicorn/tests/FirstServlet.java,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- FirstServlet.java 2 Jul 2008 17:34:47 -0000 1.11 +++ FirstServlet.java 12 Sep 2008 18:01:51 -0000 1.12 @@ -63,32 +63,12 @@ @Override public void init (final ServletConfig aServletConfig) throws ServletException { FirstServlet.logger.trace("init"); - // UNICORN_HOME is not set by the properties file, so we try to get it - // from the servlet - //if(props.getProperty("UNICORN_HOME") == null) { - String sPathToServlet = aServletConfig.getServletContext().getRealPath("/") + "/"; - // Hack for Jigsaw - if ("jigsaw".equals(Property.get("SERVER_TYPE"))) { - sPathToServlet += aServletConfig.getServletName() + "/"; - } - /* // TODO replace by org.w3c.unicorn.util.Property - if (Configuration.get("SERVER_TYPE").equals("jigsaw")) { - sPathToServlet += aServletConfig.getServletName() + "/"; - } - */ - final Property aProperty = Property.getProperty("UNICORN_HOME"); - aProperty.clear(); - aProperty.setSpecific(sPathToServlet); - - /*// TODO change to use util.Property - for (final String sProp : Configuration.getConfiguration()) { - FirstServlet.logger.debug("Property : "+sProp+"."); - }*/ - + FirstServlet.factory.setRepository( new File(Property.get("UPLOADED_FILES_REPOSITORY"))); + try { - IndexGenerator.generateIndexes(); + IndexGenerator.generateIndexes(); } catch (final ResourceNotFoundException e) { FirstServlet.logger.error("ResourceNotFoundException : "+e.getMessage(), e); @@ -103,6 +83,7 @@ e.printStackTrace(); } FirstServlet.logger.info("End of initialisation of servlet."); + } /* (non-Javadoc)
Received on Friday, 12 September 2008 18:03:13 UTC