org.mmbase.servlet
Class AttachmentServlet

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--org.mmbase.servlet.MMBaseServlet
                    |
                    +--org.mmbase.servlet.BridgeServlet
                          |
                          +--org.mmbase.servlet.HandleServlet
                                |
                                +--org.mmbase.servlet.AttachmentServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class AttachmentServlet
extends HandleServlet

Serves attachments. An attachments can be any object, as long as it has a byte[] field named 'handle'. Also the fields 'filename', 'mimetype' and 'title' can be taken into consideration by this servlet and preferably the node has also those fields.

Since:
MMBase-1.6
Version:
$Id: AttachmentServlet.java,v 1.7 2002/11/06 22:04:16 michiel Exp $
Author:
Michiel Meeuwissen
See Also:
HandleServlet, ImageServlet, Serialized Form

Fields inherited from class org.mmbase.servlet.MMBaseServlet
mmbase
 
Constructor Summary
AttachmentServlet()
           
 
Method Summary
protected  java.util.Map getAssociations()
          On default, servlets are not associated with any function.
protected  java.lang.String getMimeType(Node node)
          Determins the mimetype.
 java.lang.String getServletInfo()
          Returns information about this servlet.
 
Methods inherited from class org.mmbase.servlet.HandleServlet
doGet, init, sendBytes, setContent, setExpires
 
Methods inherited from class org.mmbase.servlet.BridgeServlet
getCloud, getCloudName, getLastModified, getNode, readQuery
 
Methods inherited from class org.mmbase.servlet.MMBaseServlet
associateMapping, decRefCount, destroy, getRequestURL, getServletByAssociation, getServletByMapping, getServletMappings, getServletMappingsByAssociation, incRefCount, service
 
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
 

Constructor Detail

AttachmentServlet

public AttachmentServlet()
Method Detail

getServletInfo

public java.lang.String getServletInfo()
Description copied from class: MMBaseServlet
Returns information about this servlet. Don't forget to override it.
Overrides:
getServletInfo in class MMBaseServlet

getAssociations

protected java.util.Map getAssociations()
Description copied from class: MMBaseServlet
On default, servlets are not associated with any function. This function is called in the init method.
Overrides:
getAssociations in class HandleServlet
Following copied from class: org.mmbase.servlet.MMBaseServlet
Returns:
A map of Strings (function) -> Integer (priority). Never null.

getMimeType

protected java.lang.String getMimeType(Node node)
Determins the mimetype. Can be overridden.
Overrides:
getMimeType in class HandleServlet


MMBase build 1.6.5.20030923