org.apache.wicket.request.resource
Class MetaInfStaticResourceReference
java.lang.Object
org.apache.wicket.request.resource.ResourceReference
org.apache.wicket.request.resource.PackageResourceReference
org.apache.wicket.request.resource.MetaInfStaticResourceReference
- All Implemented Interfaces:
- Serializable
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
MetaInfStaticResourceReference
public MetaInfStaticResourceReference(Class<?> scope,
String name)
- Construct.
- Parameters:
scope
- mandatory parametername
- mandatory parameter
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
.
isMetaInfResourcesSupported
protected boolean isMetaInfResourcesSupported()
Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.