Class MetaInfStaticResourceReference

  • All Implemented Interfaces:
    Serializable, IClusterable

    public class MetaInfStaticResourceReference
    extends PackageResourceReference
    Resource reference for static files. The resource must reside under the "/META-INF/resources/" directory. So if you have a foo.bar.Component and want to have a static icon.gif belonging to it the image must be available on the "META-INF/resources/foo/bar/icon.gif" classpath inside a jar file. If run under a Servlet 3.0 environment "foo/bar/icon.gif" like resource urls will be made and served by the servlet container instead of wicket (which is faster). If run under a non Servlet 3.0 environment (like 2.5) resources will be served by wicket (urls will look like "wicket/resource/foo/bar/icon.gif").
    Author:
    akiraly
    See Also:
    Serialized Form
    • Method Detail

      • mapHandler

        public Url mapHandler​(IRequestHandler requestHandler)
        Returns the Url for given IRequestHandler if "/META-INF/resources" Servlet 3.0 feature is supported or null if not (so standard url mapping can take place).
        Parameters:
        requestHandler - mandatory parameter
        Returns:
        Url instance or null.