Example usage for org.apache.wicket.markup.html SecurePackageResourceGuard setAllowAccessToRootResources

List of usage examples for org.apache.wicket.markup.html SecurePackageResourceGuard setAllowAccessToRootResources

Introduction

In this page you can find the example usage for org.apache.wicket.markup.html SecurePackageResourceGuard setAllowAccessToRootResources.

Prototype

public final void setAllowAccessToRootResources(boolean allowAccessToRootResources) 

Source Link

Document

Sets whether or not resources in the web root folder can be accessed.

Usage

From source file:org.hippoecm.frontend.skin.IconUtilTest.java

License:Apache License

@Before
public void setUp() {
    final IResourceSettings resourceSettings = Application.get().getResourceSettings();
    final IPackageResourceGuard packageResourceGuard = resourceSettings.getPackageResourceGuard();
    if (packageResourceGuard instanceof SecurePackageResourceGuard) {
        SecurePackageResourceGuard guard = (SecurePackageResourceGuard) packageResourceGuard;
        guard.setAllowAccessToRootResources(true);
    }//from www .  j  a v  a 2s  . co m
}