com.liferay.portal.servlet
Class ImageServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.liferay.portal.servlet.ImageServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class ImageServlet
extends javax.servlet.http.HttpServlet

View Source

Author:
Brian Wing Shun Chan, Brett Randall
See Also:
Serialized Form

Constructor Summary
ImageServlet()
           
 
Method Summary
protected  com.liferay.portal.model.Image getDefaultImage(javax.servlet.http.HttpServletRequest request, long imageId)
           
protected  com.liferay.portal.model.Image getImage(javax.servlet.http.HttpServletRequest request, boolean getDefault)
           
protected  long getImageId(javax.servlet.http.HttpServletRequest request)
           
protected  long getLastModified(javax.servlet.http.HttpServletRequest request)
           
 void init(javax.servlet.ServletConfig servletConfig)
           
 void service(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
protected  void writeImage(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPost, doPut, doTrace, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ImageServlet

public ImageServlet()
Method Detail

init

public void init(javax.servlet.ServletConfig servletConfig)
          throws javax.servlet.ServletException
Specified by:
init in interface javax.servlet.Servlet
Overrides:
init in class javax.servlet.GenericServlet
Throws:
javax.servlet.ServletException

service

public void service(javax.servlet.http.HttpServletRequest request,
                    javax.servlet.http.HttpServletResponse response)
             throws java.io.IOException,
                    javax.servlet.ServletException
Overrides:
service in class javax.servlet.http.HttpServlet
Throws:
java.io.IOException
javax.servlet.ServletException

getDefaultImage

protected com.liferay.portal.model.Image getDefaultImage(javax.servlet.http.HttpServletRequest request,
                                                         long imageId)
                                                  throws com.liferay.portal.NoSuchImageException
Throws:
com.liferay.portal.NoSuchImageException

getImage

protected com.liferay.portal.model.Image getImage(javax.servlet.http.HttpServletRequest request,
                                                  boolean getDefault)
                                           throws com.liferay.portal.PortalException,
                                                  com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException

getImageId

protected long getImageId(javax.servlet.http.HttpServletRequest request)

getLastModified

protected long getLastModified(javax.servlet.http.HttpServletRequest request)
Overrides:
getLastModified in class javax.servlet.http.HttpServlet

writeImage

protected void writeImage(javax.servlet.http.HttpServletRequest request,
                          javax.servlet.http.HttpServletResponse response)
                   throws com.liferay.portal.PortalException,
                          com.liferay.portal.SystemException
Throws:
com.liferay.portal.PortalException
com.liferay.portal.SystemException