|
||||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |
java.lang.Objectorg.apache.struts2.dispatcher.DefaultStaticContentLoader
public class DefaultStaticContentLoader
Default implementation to server static content
This class is used to serve common static content needed when using various parts of Struts, such as JavaScript files, CSS files, etc. It works by looking for requests to /struts/* (or /static/*), and then mapping the value after "/struts/" to common packages in Struts and, optionally, in your class path. By default, the following packages are automatically searched:
构造方法摘要 | |
---|---|
DefaultStaticContentLoader()
|
方法摘要 | |
---|---|
boolean |
canHandle(String resourcePath)
|
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 |
setEncoding(String val)
Modify state of StrutsConstants.STRUTS_I18N_ENCODING setting. |
void |
setHostConfig(HostConfig filterConfig)
|
void |
setServeStaticBrowserCache(String val)
Modify state of StrutsConstants.STRUTS_SERVE_STATIC_BROWSER_CACHE setting. |
void |
setServeStaticContent(String val)
Modify state of StrutsConstants.STRUTS_SERVE_STATIC_CONTENT setting. |
从类 java.lang.Object 继承的方法 |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
构造方法详细信息 |
---|
public DefaultStaticContentLoader()
方法详细信息 |
---|
public void setServeStaticContent(String val)
val
- New settingpublic void setServeStaticBrowserCache(String val)
val
- New settingpublic void setEncoding(String val)
val
- New settingpublic void setHostConfig(HostConfig filterConfig)
StaticContentLoader
中的 setHostConfig
filterConfig
- The filter configurationpublic void findStaticResource(String path, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) throws IOException
StaticContentLoader
复制的描述
StaticContentLoader
中的 findStaticResource
path
- The resource namerequest
- The requestresponse
- The response
IOException
- If anything goes wrongpublic boolean canHandle(String resourcePath)
StaticContentLoader
中的 canHandle
resourcePath
- Requested resource path
|
||||||||||
上一个类 下一个类 | 框架 无框架 | |||||||||
摘要: 嵌套 | 字段 | 构造方法 | 方法 | 详细信息: 字段 | 构造方法 | 方法 |