use of org.apache.wicket.markup.html.IPackageResourceGuard in project wicket by apache.
the class VelocityTemplateApplication method init.
/**
* @see org.apache.wicket.protocol.http.WebApplication#init()
*/
@Override
protected void init() {
getDebugSettings().setDevelopmentUtilitiesEnabled(true);
IPackageResourceGuard packageResourceGuard = getResourceSettings().getPackageResourceGuard();
if (packageResourceGuard instanceof SecurePackageResourceGuard) {
SecurePackageResourceGuard guard = (SecurePackageResourceGuard) packageResourceGuard;
// allow velocity macros resources
guard.addPattern("+*.vm");
}
// initialize velocity
try {
Velocity.init();
} catch (Exception e) {
throw new WicketRuntimeException(e);
}
}
Aggregations