Compoze Software, Inc.

com.compoze.discussion
Class MessageFileAttachmentServlet

java.lang.Object
  |
  +--javax.servlet.GenericServlet
        |
        +--javax.servlet.http.HttpServlet
              |
              +--com.compoze.discussion.MessageFileAttachmentServlet
All Implemented Interfaces:
java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class MessageFileAttachmentServlet
extends javax.servlet.http.HttpServlet

This class is a servlet that writes the file attachment. The servlet expects that an Http session attribute called DISCUSSION_SESSION_ATTRIBUTE contains the DiscussionSession object that is the discussion session.

The servlet also expects that three request parameters be set: the MESSAGE_ID parameter must contain the ID of the message which has the file attachment to serve; the FILE_ATTACHMENT_ID parameter must contain the ID of the file attachment to serve.

See Also:
Serialized Form

Field Summary
static java.lang.String DISCUSSION_SESSION_ATTRIBUTE
          The session property name holding the DiscussionSession object.
static java.lang.String FILE_ATTACHMENT_ID
          The file attachment id request parameter.
static java.lang.String MESSAGE_ID
          The message id request parameter.
 
Constructor Summary
MessageFileAttachmentServlet()
           
 
Method Summary
 void doGet(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
protected  FileAttachment getFileAttachment(javax.servlet.http.HttpServletRequest request)
          Gets the file attachment.
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doHead, doOptions, doPost, doPut, doTrace, getLastModified, service, 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
 

Field Detail

MESSAGE_ID

public static final java.lang.String MESSAGE_ID
The message id request parameter.

FILE_ATTACHMENT_ID

public static final java.lang.String FILE_ATTACHMENT_ID
The file attachment id request parameter.

DISCUSSION_SESSION_ATTRIBUTE

public static final java.lang.String DISCUSSION_SESSION_ATTRIBUTE
The session property name holding the DiscussionSession object.
Constructor Detail

MessageFileAttachmentServlet

public MessageFileAttachmentServlet()
Method Detail

doGet

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

getFileAttachment

protected FileAttachment getFileAttachment(javax.servlet.http.HttpServletRequest request)
Gets the file attachment.
Parameters:
request - the http servlet request
Returns:
the file attachment or null if not found

Compoze Software, Inc.

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.