|
||||||||||
| 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
org.mmbase.servlet.MMBaseServlet
org.mmbase.servlet.BridgeServlet
org.mmbase.servlet.HandleServlet
Base servlet for nodes with a 'handle' field. It serves as a basic implementation for more specialized servlets. The mime-type is always application/x-binary, forcing the browser to download.
ImageServlet,
AttachmentServlet,
Serialized Form| Nested Class Summary |
| Nested classes inherited from class org.mmbase.servlet.BridgeServlet |
BridgeServlet.QueryParts |
| Field Summary | |
protected static Pattern |
legalizeFileName
|
| Fields inherited from class org.mmbase.servlet.BridgeServlet |
FILE_PATTERN, MESSAGE_ATTRIBUTE |
| Fields inherited from class org.mmbase.servlet.MMBaseServlet |
mmbase, retryAfter |
| Constructor Summary | |
HandleServlet()
|
|
| Method Summary | |
void |
doGet(HttpServletRequest req,
HttpServletResponse res)
Serves a node with a byte[] handle field as an attachment. |
protected Map |
getAssociations()
On default, servlets are not associated with any function. |
protected Cloud |
getClassCloud()
Obtains a cloud using 'class' security. |
protected String |
getFileName(Node node,
Node titleNode,
String def)
|
protected String |
getMimeType(Node node)
Forces download in browsers. |
void |
init()
Takes care of the 'expire' init-parameter. |
static void |
main(String[] argv)
Just to test to damn regexp |
protected void |
sendBytes(HttpServletResponse res,
byte[] bytes)
Deprecated. |
protected void |
sendBytes(HttpServletResponse res,
InputStream bytes)
|
protected boolean |
setCacheControl(HttpServletResponse res,
Node node)
Sets cache-controlling headers. |
protected boolean |
setContent(BridgeServlet.QueryParts query,
Node node,
String mimeType)
Sets the content disposition header. |
protected boolean |
setExpires(HttpServletResponse res,
Node node)
Sets the exires header. |
| Methods inherited from class org.mmbase.servlet.BridgeServlet |
desperatelyGetNode, findCloud, getAnonymousCloud, getCloud, getCloudName, getLastModified, getNode, getServedNode, readQuery, readQuery, readServletPath |
| Methods inherited from class org.mmbase.servlet.MMBaseServlet |
associateMapping, checkInited, decRefCount, destroy, getMMBase, getRequestURL, getServletByAssociation, getServletByMapping, getServletInfo, getServletMappings, getServletMappingsByAssociation, incRefCount, service, setInitException, setMMBase |
| Methods inherited from class javax.servlet.http.HttpServlet |
doDelete, doHead, doOptions, doPost, doPut, doTrace, service |
| Methods inherited from class javax.servlet.GenericServlet |
getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletName, init, log, log |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected static final Pattern legalizeFileName
| Constructor Detail |
public HandleServlet()
| Method Detail |
protected Map getAssociations()
MMBaseServlet
getAssociations in class MMBaseServlet
public void init()
throws ServletException
init in class BridgeServletServletExceptionprotected Cloud getClassCloud()
BridgeServlet
getClassCloud in class BridgeServletprotected String getMimeType(Node node)
protected String getFileName(Node node,
Node titleNode,
String def)
protected boolean setContent(BridgeServlet.QueryParts query,
Node node,
String mimeType)
throws IOException
IOException
protected boolean setExpires(HttpServletResponse res,
Node node)
protected boolean setCacheControl(HttpServletResponse res,
Node node)
public void doGet(HttpServletRequest req,
HttpServletResponse res)
throws ServletException,
IOException
doGet in class MMBaseServletServletException
IOException
protected final void sendBytes(HttpServletResponse res,
byte[] bytes)
throws IOException
IOException
protected final void sendBytes(HttpServletResponse res,
InputStream bytes)
throws IOException
IOExceptionpublic static void main(String[] argv)
BridgeServlet
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||