public static void sendbackOriginalDoc(MimePart mp, String contentType, HttpServletResponse resp) throws IOException, MessagingException { ContentDisposition cd = new ContentDisposition(Part.INLINE); String filename = mp.getFileName();
public static void sendbackOriginalDoc(MimePart mp, String contentType, HttpServletRequest req, HttpServletResponse resp) throws IOException, MessagingException { String filename = Mime.getFilename(mp);
    public static void sendbackOriginalDoc(MimePart mp, String contentType, HttpServletResponse resp) throws IOException, MessagingException {        ContentDisposition cd = new ContentDisposition(Part.INLINE);        String filename = mp.getFileName();        if (filename == null)            filename = "unknown";        cd.setParameter("filename", filename);        resp.addHeader("Content-Disposition", cd.toString());        String desc = mp.getDescription();        if (desc != null)            resp.addHeader("Content-Description", desc);        sendbackOriginalDoc(mp.getInputStream(), contentType, resp);    }