org.mmbase.servlet
Class ImageServlet
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.ImageServlet
- All Implemented Interfaces:
- Serializable, Servlet, ServletConfig, MMBaseStarter
public class ImageServlet
- extends HandleServlet
ImageServlet handles nodes as images. If you want to convert an image (resize it, turn it, change
its colors etc) then you want to serve an 'icaches' node ('icaches' are cached conversions of
images), which you have to create yourself before calling this servlet. The cache() function of
Images can be used for this. An URL can be gotten with cachepath().
- Since:
- MMBase-1.6
- Version:
- $Id: ImageServlet.java 44572 2011-01-06 08:56:39Z michiel $
- Author:
- Michiel Meeuwissen
- See Also:
AbstractImages,
Images.executeFunction(org.mmbase.module.core.MMObjectNode, java.lang.String, java.util.List>),
AttachmentServlet,
Serialized Form
| Methods inherited from class org.mmbase.servlet.BridgeServlet |
, findCloud, getAnonymousCloud, getCloud, getCloudName, getLastModified, getNode, readQuery, readQuery, readQueryFromRequestURI, readServletPath |
| Methods inherited from class org.mmbase.servlet.MMBaseServlet |
associateMapping, checkInited, decRefCount, destroy, getBasePath, getMMBase, getRequestURL, getServletByAssociation, getServletByMapping, getServletMappings, getServletMappingsByAssociation, incRefCount, service, setInitException, setMMBase |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ImageServlet
public ImageServlet()
init
public void init()
throws ServletException
- Description copied from class:
HandleServlet
- Takes care of the 'expire' init-parameter.
- Overrides:
init in class HandleServlet
- Throws:
ServletException
getClassCloud
protected final Cloud getClassCloud()
- Overrides:
getClassCloud in class HandleServlet
getServletInfo
public String getServletInfo()
- Specified by:
getServletInfo in interface Servlet- Overrides:
getServletInfo in class MMBaseServlet
getAssociations
protected Map<String,Integer> getAssociations()
- Overrides:
getAssociations in class HandleServlet
getMimeType
protected String getMimeType(Node node)
- Description copied from class:
HandleServlet
- Forces download in browsers.
This is overriden in several extensions.
- Overrides:
getMimeType in class HandleServlet
setContent
protected boolean setContent(BridgeServlet.QueryParts query,
Node node,
String mimeType)
throws IOException
- Content-Disposition header
Sets the content disposition header.
- Overrides:
setContent in class HandleServlet
- Returns:
- true on success
- Throws:
IOException
getServedNode
protected Node getServedNode(BridgeServlet.QueryParts query,
Node node)
throws IOException
- ImageServlet can serve a icache node in stead (using the 'extra parameters)'
- Overrides:
getServedNode in class BridgeServlet
- Throws:
IOException- Since:
- MMBase-1.7.4
desperatelyGetNode
protected Node desperatelyGetNode(Cloud cloud,
String nodeIdentifier)
- Overridden to support 'title aliases'.
- Overrides:
desperatelyGetNode in class BridgeServlet
- Since:
- MMBase-1.7.5
MMBase2 Resources 2.0-SNAPSHOT - 2013-03-30T06:37