|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.directwebremoting.servlet.FileHandler
public class FileHandler
Basically a file servlet component that does some very limitted EL type processing on the file. See the source for the cheat.
| Field Summary | |
|---|---|
protected int |
compressionLevel
How much do we compression javascript by? |
protected IdGenerator |
generator
The method by which we get new page ids |
protected boolean |
ignoreLastModified
Do we ignore all the Last-Modified/ETags blathering? |
protected int |
pageIdLength
The page id length |
protected static java.lang.String |
PARAM_DEFAULT_PATH
What is the replacement field we use to tell engine.js what we are using for script tag hack protection |
protected static java.lang.String |
PARAM_SCRIPT_ALLOWGET
Does engine.js do GETs for Safari |
protected static java.lang.String |
PARAM_SCRIPT_COOKIENAME
Under what cookie name is the session id stored? |
protected static java.lang.String |
PARAM_SCRIPT_SESSIONID
The page id parameter that goes in engine.js |
protected static java.lang.String |
PARAM_SCRIPT_TAG_PROTECTION
What is the replacement field we use to tell engine.js what we are using for script tag hack protection |
protected java.util.Map |
scriptCache
We cache the script output for speed |
protected boolean |
scriptCompressed
Do we retain comments and unneeded spaces in Javascript code? |
protected java.lang.String |
sessionCookieName
The session cookie name |
| Constructor Summary | |
|---|---|
FileHandler()
Create a new FileHandler |
|
FileHandler(java.lang.String filePath,
java.lang.String mimeType,
boolean dynamic)
Create a new FileHandler |
|
| Method Summary | |
|---|---|
void |
handle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Handle a URL request that has been mapped to this Handler |
void |
setAllowGetForSafariButMakeForgeryEasier(boolean allowGetForSafariButMakeForgeryEasier)
|
void |
setCompressionLevel(int compressionLevel)
|
void |
setDynamic(boolean dynamic)
Are we expected to do the minor EL type processing? |
void |
setFilePath(java.lang.String filePath)
|
void |
setIgnoreLastModified(boolean ignoreLastModified)
|
void |
setMimeType(java.lang.String mimeType)
The mime type to send the output under |
void |
setOverridePath(java.lang.String overridePath)
If we need to override the default path |
void |
setScriptCompressed(boolean scriptCompressed)
To what level do we compress scripts? |
void |
setScriptTagProtection(java.lang.String scriptTagProtection)
What is the string we use for script tag hack protection |
void |
setSessionCookieName(java.lang.String sessionCookieName)
Alter the session cookie name from the default JSESSIONID. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected boolean ignoreLastModified
protected java.lang.String sessionCookieName
protected int compressionLevel
protected boolean scriptCompressed
protected IdGenerator generator
protected int pageIdLength
protected final java.util.Map scriptCache
protected static final java.lang.String PARAM_SCRIPT_ALLOWGET
protected static final java.lang.String PARAM_SCRIPT_SESSIONID
protected static final java.lang.String PARAM_SCRIPT_COOKIENAME
protected static final java.lang.String PARAM_SCRIPT_TAG_PROTECTION
protected static final java.lang.String PARAM_DEFAULT_PATH
| Constructor Detail |
|---|
public FileHandler(java.lang.String filePath,
java.lang.String mimeType,
boolean dynamic)
filePath - The filePath to search for, process and outputmimeType - The mime type to use for this output filedynamic - Should the script be recalculated each time?public FileHandler()
| Method Detail |
|---|
public void handle(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws java.io.IOException
Handler
handle in interface Handlerrequest - The HTTP request dataresponse - Where we write the HTTP response data
java.io.IOException - If the write process failspublic void setAllowGetForSafariButMakeForgeryEasier(boolean allowGetForSafariButMakeForgeryEasier)
allowGetForSafariButMakeForgeryEasier - Do we reduce security to help Safaripublic void setIgnoreLastModified(boolean ignoreLastModified)
ignoreLastModified - The ignoreLastModified to set.public void setSessionCookieName(java.lang.String sessionCookieName)
sessionCookieName - the sessionCookieName to setpublic void setScriptCompressed(boolean scriptCompressed)
scriptCompressed - The scriptCompressed to set.public void setCompressionLevel(int compressionLevel)
compressionLevel - The compressionLevel to set.public void setFilePath(java.lang.String filePath)
filePath - the filePath to setpublic void setDynamic(boolean dynamic)
dynamic - the dynamic to setpublic void setMimeType(java.lang.String mimeType)
mimeType - the mimeType to setpublic void setScriptTagProtection(java.lang.String scriptTagProtection)
scriptTagProtection - the scriptTagProtection to setpublic void setOverridePath(java.lang.String overridePath)
overridePath - The new override path
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||