Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.directwebremoting.servlet
Class FileHandler

    java.lang.Object
      org.directwebremoting.servlet.FileHandler

All Implemented Interfaces:
  Handler

Direct Known Subclasses:
  AuthHandler, EngineHandler, UtilHandler, WebworkUtilHandler

    public class FileHandler

extends java.lang.Object
implements Handler

Basically a file servlet component that does some very limitted EL type processing on the file. See the source for the cheat.

Author:
  Joe Walker [joe at getahead dot ltd dot uk]

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
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### FileHandler

    public FileHandler(java.lang.String filePath,
                       java.lang.String mimeType,
                       boolean dynamic)

  Create a new FileHandler

  Parameters:
    `filePath` - The filePath to search for, process and output
    `mimeType` - The mime type to use for this output file
    `dynamic` - Should the script be recalculated each time?

### FileHandler

    public FileHandler()

  Create a new FileHandler

Method Detail

### handle

    public void handle(javax.servlet.http.HttpServletRequest request,
                       javax.servlet.http.HttpServletResponse response)
                throws java.io.IOException

  Description copied from interface: `Handler`
  Handle a URL request that has been mapped to this Handler

  Specified by:
    `handle` in interface `Handler`
  Parameters:
    `request` - The HTTP request data
    `response` - Where we write the HTTP response data
  Throws:
    `java.io.IOException` - If the write process fails

### setAllowGetForSafariButMakeForgeryEasier

    public void setAllowGetForSafariButMakeForgeryEasier(boolean allowGetForSafariButMakeForgeryEasier)

  Parameters:
    `allowGetForSafariButMakeForgeryEasier` - Do we reduce security to help Safari

### setIgnoreLastModified

    public void setIgnoreLastModified(boolean ignoreLastModified)

  Parameters:
    `ignoreLastModified` - The ignoreLastModified to set.

### setSessionCookieName

    public void setSessionCookieName(java.lang.String sessionCookieName)

  Alter the session cookie name from the default JSESSIONID.

  Parameters:
    `sessionCookieName` - the sessionCookieName to set

### setScriptCompressed

    public void setScriptCompressed(boolean scriptCompressed)

  To what level do we compress scripts?

  Parameters:
    `scriptCompressed` - The scriptCompressed to set.

### setCompressionLevel

    public void setCompressionLevel(int compressionLevel)

  Parameters:
    `compressionLevel` - The compressionLevel to set.

### setFilePath

    public void setFilePath(java.lang.String filePath)

  Parameters:
    `filePath` - the filePath to set

### setDynamic

    public void setDynamic(boolean dynamic)

  Are we expected to do the minor EL type processing?

  Parameters:
    `dynamic` - the dynamic to set

### setMimeType

    public void setMimeType(java.lang.String mimeType)

  The mime type to send the output under

  Parameters:
    `mimeType` - the mimeType to set

### setScriptTagProtection

    public void setScriptTagProtection(java.lang.String scriptTagProtection)

  What is the string we use for script tag hack protection

  Parameters:
    `scriptTagProtection` - the scriptTagProtection to set

### setOverridePath

    public void setOverridePath(java.lang.String overridePath)

  If we need to override the default path

  Parameters:
    `overridePath` - The new override path

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Copyright ¬ 2005
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD