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 req, long imageId)
           
protected  com.liferay.portal.model.Image getImage(javax.servlet.http.HttpServletRequest req, boolean getDefault)
           
protected  long getImageId(javax.servlet.http.HttpServletRequest req)
           
protected  long getLastModified(javax.servlet.http.HttpServletRequest req)
           
 void service(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
           
protected  void writeImage(javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
           
 
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, 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

service

public void service(javax.servlet.http.HttpServletRequest req,
                    javax.servlet.http.HttpServletResponse res)
             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 req,
                                                         long imageId)
                                                  throws com.liferay.portal.NoSuchImageException
Throws:
com.liferay.portal.NoSuchImageException

getImage

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

getImageId

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

getLastModified

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

writeImage

protected void writeImage(javax.servlet.http.HttpServletRequest req,
                          javax.servlet.http.HttpServletResponse res)
                   throws java.io.IOException,
                          com.liferay.portal.NoSuchImageException,
                          javax.servlet.ServletException
Throws:
java.io.IOException
com.liferay.portal.NoSuchImageException
javax.servlet.ServletException