|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object atg.servlet.pagefilter.PageFilterUtil
public class PageFilterUtil
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
Method Summary | |
---|---|
static void |
encodeHTMLFile(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse,
java.lang.String pFilename,
java.lang.String pSrcEncoding,
boolean pCacheData)
Takes the file name specified, parses it and encodes all URLs it found using the request.encodeURL method. |
static void |
writeFile(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse,
java.lang.String pFilename,
java.lang.String pSrcEncoding,
boolean pCacheData)
This method will write a file to the response supplied. |
static void |
writeHTMLFile(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse,
java.lang.String pFilename,
java.lang.String pSrcEncoding,
boolean pCacheData,
boolean pSetContentType)
Takes the name of an HTML file and writes its content to the response supplied. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String CLASS_VERSION
Method Detail |
---|
public static void writeHTMLFile(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse, java.lang.String pFilename, java.lang.String pSrcEncoding, boolean pCacheData, boolean pSetContentType) throws java.io.IOException
If URLs are encoded, and the response has not already been committed, the dynamic headers are set to indicate that this page should not be cached. If you are calling this on a response whose headers have already been commited, you must be sure to call ServletUtil.setDynamicContentHeaders yourself before the response is committed so that the headers can prevent proxy servers from caching this response.
If the response has not been committed and the pSetContentType parameter is true, the content type is also set to: "text/html; charset=the encoding you supply. You should only set this to true, if no output has been written to the response yet.
pRequest
- the requestpResponse
- the responsepFilename
- the filename of the file to send. This may be used as a
key to a hashtable, so it is good to ensure that some consistent form of
the pathname is used.pSrcEncoding
- the name of the encoding of the file to be written.
If null it passed, the default encoding in the response is used
(generally ISO-8859-1).pCacheData
- if true, the parsing of the HTML file is cached using
an offset table to make subsequent requests which need to encode URLs in
the same HTML file faster.
java.io.IOException
- if either the response output has been closed (i.e.
the browser's stop button was pressed), or if the input file could not
be read. To differentiate between these two cases, you will have to try
and open the file yourself after catching the IOException.public static void encodeHTMLFile(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse, java.lang.String pFilename, java.lang.String pSrcEncoding, boolean pCacheData) throws java.io.IOException
pRequest
- the requestpResponse
- the responsepFilename
- the filename of the file to send. This may be used as a
key to a hashtable, so it is good to ensure that some consistent form of
the pathname is used.pSrcEncoding
- the name of the encoding of the file to be written.
If null it passed, the default encoding in the response is used
(generally ISO-8859-1).pCacheData
- if true, the parsing of the HTML file is cached using
an offset table to make subsequent requests which need to encode URLs in
the same HTML file faster.
java.io.IOException
- if either the response output has been closed (i.e.
the browser's stop button was pressed), or if the input file could not
be read. To differentiate between these two cases, you will have to try
and open the file yourself after catching the IOException.public static void writeFile(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse, java.lang.String pFilename, java.lang.String pSrcEncoding, boolean pCacheData) throws java.io.IOException
pRequest
- the requestpResponse
- the responsepFilename
- the filename of the file to send. This may be used as a
key to a hashtable, so it is good to ensure that some consistent form of
the pathname is used.pSrcEncoding
- the name of the encoding of the file to be written.
If null it passed, the default encoding in the response is used
(generally ISO-8859-1).pCacheData
- if true, the parsing of the HTML file is cached using
an offset table to make subsequent requests which need to encode URLs in
the same HTML file faster.
java.io.IOException
- if either the response output has been closed (i.e.
the browser's stop button was pressed), or if the input file could not
be read. To differentiate between these two cases, you will have to try
and open the file yourself after catching the IOException.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |