org.apache.struts2.dispatcher
接口 StaticContentLoader
- 所有已知实现类: 
 - DefaultStaticContentLoader
 
public interface StaticContentLoader
Interface for loading static resources, based on a path. After implementing your own static content loader
 you must tell the framework how to use it, eg.
 <bean name="myContentLoader" type="org.apache.struts2.dispatcher" class="com.company.struts.MyContentLoader"/>
 <constant name="struts.staticContentLoader" value="myContentLoader"/>
 Check DefaultBeanSelectionProvider for more details.
| 
方法摘要 | 
 boolean | 
canHandle(String path)
 
            | 
 void | 
findStaticResource(String path,
                   javax.servlet.http.HttpServletRequest request,
                   javax.servlet.http.HttpServletResponse response)
 
          Locate a static resource and copy directly to the response, setting the
 appropriate caching headers. | 
 void | 
setHostConfig(HostConfig filterConfig)
 
            | 
 
canHandle
boolean canHandle(String path)
- 参数:
 path - Requested resource path
- 返回:
 - true if this loader is able to load this type of resource, false otherwise
 
 
setHostConfig
void setHostConfig(HostConfig filterConfig)
- 参数:
 filterConfig - The filter configuration
 
findStaticResource
void findStaticResource(String path,
                        javax.servlet.http.HttpServletRequest request,
                        javax.servlet.http.HttpServletResponse response)
                        throws IOException
- Locate a static resource and copy directly to the response, setting the
 appropriate caching headers.
- 参数:
 path - The resource namerequest - The requestresponse - The response
- 抛出:
 IOException - If anything goes wrong