|
||||||||||
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 String |
PARAM_APPLICATION
the URL parameter for the application name. |
static String |
PARAM_CANCELBUTTON
the URL parameter for the upload button text. |
static String |
PARAM_CONURL
the connection URL from the client. |
static String |
PARAM_INFOTEXT
the URL parameter for the info text. |
static String |
PARAM_KEY
the URL parameter for accessing the ObjectCache . |
static String |
PARAM_RESOURCE
the URL parameter for accessing resource files. |
static String |
PARAM_TITLE
the URL parameter for the title. |
Constructor Summary | |
---|---|
ResourceServlet()
|
Method Summary | |
---|---|
protected org.apache.commons.fileupload.FileItemStream |
getFileItemStream(HttpServletRequest pRequest)
Gets the first FileItemStream inside a multipart upload. |
protected String |
getFileName(String pContentDisposition)
Returns the given content-disposition headers file name. |
protected String |
getRequestURI(HttpServletRequest pRequest)
Gets the request URI that was used from the client to communicate to the server. |
protected abstract String |
getResourceDirectoryName()
Gets the name of the resource directory. |
protected void |
sendFile(String pApplication,
String pFile,
Hashtable<String,String> pParams,
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 String PARAM_KEY
ObjectCache
.
public static final String PARAM_RESOURCE
public static final String PARAM_CANCELBUTTON
public static final String PARAM_APPLICATION
public static final String PARAM_TITLE
public static final String PARAM_INFOTEXT
public static final String PARAM_CONURL
Constructor Detail |
---|
public ResourceServlet()
Method Detail |
---|
protected abstract String getResourceDirectoryName()
protected String getFileName(String pContentDisposition)
pContentDisposition
- The content-disposition headers value.
protected org.apache.commons.fileupload.FileItemStream getFileItemStream(HttpServletRequest pRequest) throws IOException
pRequest
- the HttpServletRequest
IOException
- if an IOException occurs.protected void sendFile(String pApplication, String pFile, Hashtable<String,String> pParams, HttpServletResponse pResponse) throws Exception
pApplication
- the application namepFile
- the name of the file to sendpParams
- the key/value mapping for parameter replacementpResponse
- the http response
Exception
- if an error occurs during reading from the resource file, writing the response or accessing
the configuration filesprotected String getRequestURI(HttpServletRequest pRequest)
pRequest
- the client request
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |