|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--javax.servlet.GenericServlet | +--javax.servlet.http.HttpServlet | +--com.isomorphic.servlet.BaseServlet | +--com.isomorphic.servlet.FileDownload
The FileDownload Servlet is part of the optional Network Performance package. This servlet serves files with configurable cacheing directives to minimize network traffic. It will also serve compressed versions of files when possible.
Please contact Isomorphic (http://forums.smartclient.com) to learn more about the Network Performance package.
Field Summary | |
java.util.Map |
charsets
This is a comma separated expiration mapping of the form: mimeType:charset
This allows you to specify a character encoding for a given mimeType. |
java.util.Map |
expires
This is a comma separated expiration mapping of the form: mimeType:seconds to
expiry . |
int |
stripPathComponents
Instructs this servlet to remove the specified number of paths components from the URI before looking for the file on disk. |
Field Detail |
public java.util.Map expires
mimeType:seconds to
expiry
. This allows you to specify how long the browser is allowed to cache the file
maching a given mime type from the time the file is originally served.
For example, to set javascript files to expire in 1 hour and gif images to expire in 1 day:
text/javascript:3600,image/gif:86400
The comparison is an exact match of the specified mimeType against what the
container returns for the intercepted URL. So, for example, if you specified
text/javascript:3600
here, but the container was configured to return
application/x-javascript
for *.js (a common mimeType for javascript), then your
expiry setting for *.js files would not apply.
public java.util.Map charsets
mimeType:charset
This allows you to specify a character encoding for a given mimeType.
For example, to set javascript files to be served with the UTF-8 encoding, set this value to:
text/javascript:UTF-8
For mimeTypes that do not have a charset specified, no charset setting is applied, so the container default is used.
The comparison is an exact match of the specified mimeType against what the
container returns for the intercepted URL. So, for example, if you specified
text/javascript:UTF-8
here, but the container was configured to return
application/x-javascript
for *.js (a common mimeType for javascript), then your
charset setting for *.js files would not apply.
public int stripPathComponents
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |