Class MetaInfStaticResourceReference

  extended by org.apache.wicket.request.resource.ResourceReference
      extended by org.apache.wicket.request.resource.PackageResourceReference
          extended by org.apache.wicket.request.resource.MetaInfStaticResourceReference
All Implemented Interfaces:

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 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").

See Also:
Serialized Form

Nested Class Summary
Nested classes/interfaces inherited from class org.apache.wicket.request.resource.ResourceReference
ResourceReference.Key, ResourceReference.UrlAttributes
Constructor Summary
MetaInfStaticResourceReference(java.lang.Class<?> scope, java.lang.String name)
Method Summary
protected  boolean isMetaInfResourcesSupported()
 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).
Methods inherited from class org.apache.wicket.request.resource.PackageResourceReference
getResource, getUrlAttributes
Methods inherited from class org.apache.wicket.request.resource.ResourceReference
canBeRegistered, equals, getExtension, getLocale, getName, getScope, getStyle, getVariation, hashCode, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait

Constructor Detail


public MetaInfStaticResourceReference(java.lang.Class<?> scope,
                                      java.lang.String name)

scope - mandatory parameter
name - mandatory parameter
Method Detail


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).

requestHandler - mandatory parameter
Url instance or null.


protected boolean isMetaInfResourcesSupported()

Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.