|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.servlet.GenericServlet
javax.servlet.http.HttpServlet
com.sibvisions.rad.server.http.ResourceServlet
public abstract class ResourceServlet
The ResourceServlet is a simple HttpServlet for accessing resource templates.
| Field Summary | |
|---|---|
static java.lang.String |
PARAM_APPLICATION
the URL parameter for the application name. |
static java.lang.String |
PARAM_CANCELBUTTON
the URL parameter for the upload button text. |
static java.lang.String |
PARAM_CONURL
the connection URL from the client. |
static java.lang.String |
PARAM_INFOTEXT
the URL parameter for the info text. |
static java.lang.String |
PARAM_KEY
the URL parameter for accessing the ObjectCache. |
static java.lang.String |
PARAM_RESOURCE
the URL parameter for accessing resource files. |
static java.lang.String |
PARAM_TITLE
the URL parameter for the title. |
| Constructor Summary | |
|---|---|
ResourceServlet()
|
|
| Method Summary | |
|---|---|
protected org.apache.commons.fileupload.FileItemStream |
getFileItemStream(javax.servlet.http.HttpServletRequest pRequest)
Gets the first FileItemStream inside a multipart upload. |
protected java.lang.String |
getFileName(java.lang.String pContentDisposition)
Returns the given content-disposition headers file name. |
protected java.lang.String |
getRequestURI(javax.servlet.http.HttpServletRequest pRequest)
Gets the request URI that was used from the client to communicate to the server. |
protected abstract java.lang.String |
getResourceDirectoryName()
Gets the name of the resource directory. |
protected void |
sendFile(java.lang.String pApplication,
java.lang.String pFile,
java.util.Hashtable<java.lang.String,java.lang.String> pParams,
javax.servlet.http.HttpServletResponse pResponse)
Sends the content of a file to the client. |
| Methods inherited from class javax.servlet.http.HttpServlet |
|---|
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, service |
| Methods inherited from class javax.servlet.GenericServlet |
|---|
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String PARAM_KEY
ObjectCache.
public static final java.lang.String PARAM_RESOURCE
public static final java.lang.String PARAM_CANCELBUTTON
public static final java.lang.String PARAM_APPLICATION
public static final java.lang.String PARAM_TITLE
public static final java.lang.String PARAM_INFOTEXT
public static final java.lang.String PARAM_CONURL
| Constructor Detail |
|---|
public ResourceServlet()
| Method Detail |
|---|
protected abstract java.lang.String getResourceDirectoryName()
protected java.lang.String getFileName(java.lang.String pContentDisposition)
pContentDisposition - The content-disposition headers value.
protected org.apache.commons.fileupload.FileItemStream getFileItemStream(javax.servlet.http.HttpServletRequest pRequest)
throws java.io.IOException
pRequest - the HttpServletRequest
java.io.IOException - if an IOException occurs.
protected void sendFile(java.lang.String pApplication,
java.lang.String pFile,
java.util.Hashtable<java.lang.String,java.lang.String> pParams,
javax.servlet.http.HttpServletResponse pResponse)
throws java.lang.Exception
pApplication - the application namepFile - the name of the file to sendpParams - the key/value mapping for parameter replacementpResponse - the http response
java.lang.Exception - if an error occurs during reading from the resource file, writing the response or accessing
the configuration filesprotected java.lang.String getRequestURI(javax.servlet.http.HttpServletRequest pRequest)
pRequest - the client request
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||