Search in sources :

Example 1 with AttachmentDownloadServlet

use of org.wso2.carbon.attachment.mgt.servlet.AttachmentDownloadServlet in project carbon-business-process by wso2.

the class AttachmentServiceComponent method registerAttachmentDownloadServlet.

/**
 * Register the Servlet used to download attachments
 */
private void registerAttachmentDownloadServlet() {
    HttpServlet attachmentDownloadServlet = new AttachmentDownloadServlet();
    Dictionary redirectorParams = new Hashtable(1);
    redirectorParams.put("url-pattern", "/attachment-mgt/download");
    // redirectorParams.put("url-pattern", "/t/carbon.super" + AttachmentMgtConfigurationConstants.ATTACHMENT_DOWNLOAD_SERVELET_URL_PATTERN);
    bundleContext.registerService(Servlet.class.getName(), attachmentDownloadServlet, redirectorParams);
    if (log.isDebugEnabled()) {
        log.debug("Attachment Download Servlet registered.");
    }
}
Also used : Dictionary(java.util.Dictionary) HttpServlet(javax.servlet.http.HttpServlet) Hashtable(java.util.Hashtable) HttpServlet(javax.servlet.http.HttpServlet) Servlet(javax.servlet.Servlet) AttachmentDownloadServlet(org.wso2.carbon.attachment.mgt.servlet.AttachmentDownloadServlet) AttachmentDownloadServlet(org.wso2.carbon.attachment.mgt.servlet.AttachmentDownloadServlet)

Aggregations

Dictionary (java.util.Dictionary)1 Hashtable (java.util.Hashtable)1 Servlet (javax.servlet.Servlet)1 HttpServlet (javax.servlet.http.HttpServlet)1 AttachmentDownloadServlet (org.wso2.carbon.attachment.mgt.servlet.AttachmentDownloadServlet)1