- From: Thomas Gambet via cvs-syncmail <cvsmail@w3.org>
- Date: Fri, 24 Jul 2009 13:47:48 +0000
- To: www-validator-cvs@w3.org
Update of /sources/public/2006/unicorn/org/w3c/unicorn/output
In directory hutz:/tmp/cvs-serv28782/org/w3c/unicorn/output
Modified Files:
SimpleOutputFormater.java XMLOutputFormater.java
Log Message:
Fixed errors where the velocity config file could not be found
New template system for index.html : only one velocity template file and several language properties files
Index: XMLOutputFormater.java
===================================================================
RCS file: /sources/public/2006/unicorn/org/w3c/unicorn/output/XMLOutputFormater.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- XMLOutputFormater.java 19 Jun 2008 11:15:54 -0000 1.4
+++ XMLOutputFormater.java 24 Jul 2009 13:47:46 -0000 1.5
@@ -155,8 +155,11 @@
static {
try {
final Properties aProperties = new Properties();
- aProperties.load(new URL("file:"
- + Property.get("VELOCITY_CONFIG_FILE")).openStream());
+ //aProperties.load(new URL("file:"
+ // + Property.get("VELOCITY_CONFIG_FILE")).openStream());
+
+ aProperties.load(new URL(Property.class.getResource("/"),
+ Property.get("REL_PATH_TO_CONF_FILES") + "velocity.properties").openStream());
aProperties.put(Velocity.FILE_RESOURCE_LOADER_PATH, Property
.get("PATH_TO_OUTPUT_TEMPLATES"));
Index: SimpleOutputFormater.java
===================================================================
RCS file: /sources/public/2006/unicorn/org/w3c/unicorn/output/SimpleOutputFormater.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- SimpleOutputFormater.java 19 Jun 2008 11:15:39 -0000 1.3
+++ SimpleOutputFormater.java 24 Jul 2009 13:47:46 -0000 1.4
@@ -100,8 +100,11 @@
static {
try {
final Properties aProperties = new Properties();
- aProperties.load(new URL("file:"
- + Property.get("VELOCITY_CONFIG_FILE")).openStream());
+ //aProperties.load(new URL("file:"
+ // + Property.get("VELOCITY_CONFIG_FILE")).openStream());
+
+ aProperties.load(new URL(Property.class.getResource("/"),
+ Property.get("REL_PATH_TO_CONF_FILES") + "velocity.properties").openStream());
aProperties.put(Velocity.FILE_RESOURCE_LOADER_PATH, Property
.get("PATH_TO_OUTPUT_TEMPLATES"));
Received on Friday, 24 July 2009 13:47:57 UTC