Search in sources :

Example 6 with IPackageResourceGuard

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);
    }
}
Also used : IPackageResourceGuard(org.apache.wicket.markup.html.IPackageResourceGuard) SecurePackageResourceGuard(org.apache.wicket.markup.html.SecurePackageResourceGuard) WicketRuntimeException(org.apache.wicket.WicketRuntimeException) WicketRuntimeException(org.apache.wicket.WicketRuntimeException)

Aggregations

IPackageResourceGuard (org.apache.wicket.markup.html.IPackageResourceGuard)6 SecurePackageResourceGuard (org.apache.wicket.markup.html.SecurePackageResourceGuard)6 SpringComponentInjector (org.apache.wicket.spring.injection.annot.SpringComponentInjector)3 AnnotatedMountScanner (org.wicketstuff.annotation.scan.AnnotatedMountScanner)2 BootstrapSettings (de.agilecoders.wicket.core.settings.BootstrapSettings)1 ThemeProvider (de.agilecoders.wicket.core.settings.ThemeProvider)1 Bootstrap3Theme (de.agilecoders.wicket.themes.markup.html.bootstrap3.Bootstrap3Theme)1 GoogleTheme (de.agilecoders.wicket.themes.markup.html.google.GoogleTheme)1 MetroTheme (de.agilecoders.wicket.themes.markup.html.metro.MetroTheme)1 WicketTheme (de.agilecoders.wicket.themes.markup.html.wicket.WicketTheme)1 BootswatchThemeProvider (de.agilecoders.wicket.themes.settings.BootswatchThemeProvider)1 ExceptionPage (eu.esdihumboldt.hale.server.webapp.pages.ExceptionPage)1 SecuredPage (eu.esdihumboldt.hale.server.webapp.pages.SecuredPage)1 WicketRuntimeException (org.apache.wicket.WicketRuntimeException)1 SimplePageAuthorizationStrategy (org.apache.wicket.authorization.strategies.page.SimplePageAuthorizationStrategy)1 PageProvider (org.apache.wicket.core.request.handler.PageProvider)1 RenderPageRequestHandler (org.apache.wicket.core.request.handler.RenderPageRequestHandler)1 IRequestHandler (org.apache.wicket.request.IRequestHandler)1 AbstractRequestCycleListener (org.apache.wicket.request.cycle.AbstractRequestCycleListener)1 RequestCycle (org.apache.wicket.request.cycle.RequestCycle)1