File tree Expand file tree Collapse file tree 2 files changed +8
-28
lines changed Expand file tree Collapse file tree 2 files changed +8
-28
lines changed Original file line number Diff line number Diff line change 8
8
import org .apache .velocity .runtime .RuntimeConstants ;
9
9
import org .apache .velocity .runtime .resource .loader .ClasspathResourceLoader ;
10
10
import org .apache .velocity .tools .ToolManager ;
11
+ import org .apache .velocity .tools .config .ConfigurationUtils ;
12
+ import org .apache .velocity .tools .config .FactoryConfiguration ;
11
13
import org .w3c .css .error .ErrorReportHTML ;
12
14
import org .w3c .css .parser .CssError ;
13
15
import org .w3c .css .parser .CssErrorToken ;
@@ -84,13 +86,15 @@ public class StyleSheetGenerator extends StyleReport {
84
86
}
85
87
86
88
try {
87
- Velocity .setProperty (RuntimeConstants .RESOURCE_LOADER ,
88
- "classpath" );
89
+ Velocity .setProperty (RuntimeConstants .RESOURCE_LOADER , "classpath" );
89
90
Velocity .setProperty ("classpath.resource.loader.class" ,
90
91
ClasspathResourceLoader .class .getName ());
91
92
Velocity .init ();
92
- velocityToolManager = new ToolManager ();
93
- velocityToolManager .configure ("org/w3c/css/css/velocity-tools.xml" );
93
+
94
+ FactoryConfiguration f ;
95
+ f = ConfigurationUtils .findInClasspath ("org/apache/velocity/tools/generic/tools.xml" );
96
+ velocityToolManager = new ToolManager (false , false );
97
+ velocityToolManager .configure (f );
94
98
} catch (Exception e ) {
95
99
System .err .println ("Failed to initialize Velocity. " +
96
100
"Validator might not work as expected." );
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments