Package org.apache.wicket.core.util.file
Class WebApplicationPath
- java.lang.Object
-
- org.apache.wicket.core.util.file.WebApplicationPath
-
- All Implemented Interfaces:
IResourceFinder
public final class WebApplicationPath extends Object implements IResourceFinder
AnIResourceFinder
that looks in a folder in the webapp context path. It will not load files inside WEB-INF.- Author:
- Johan Compagner, Carl-Eric Menzel
-
-
Constructor Summary
Constructors Constructor Description WebApplicationPath(javax.servlet.ServletContext servletContext, String path)
Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IResourceStream
find(Class<?> clazz, String pathname)
Looks for a given pathname along this pathString
toString()
-
-
-
Constructor Detail
-
WebApplicationPath
public WebApplicationPath(javax.servlet.ServletContext servletContext, String path)
Constructor- Parameters:
servletContext
- The webapplication context where the resources must be loaded frompath
- The path inside the app context where to look.
-
-
Method Detail
-
find
public IResourceStream find(Class<?> clazz, String pathname)
Description copied from interface:IResourceFinder
Looks for a given pathname along this path- Specified by:
find
in interfaceIResourceFinder
- Parameters:
clazz
- The class requesting the resource streampathname
- The filename with possible path- Returns:
- The resource stream
- See Also:
IResourceFinder.find(Class, String)
-
toString
public String toString()
- Overrides:
toString
in classObject
- See Also:
Object.toString()
-
-