当前位置: 技术问答>java相关
请问如何在JAVAMAIL中显示图片,如果附件中不是图片,如何给它加上链接让用户下载呢?
来源: 互联网 发布时间:2015-03-18
本文导语: 请高手指教 | If the message came across as text/html content, just send the HTML out as the output of the JSP request. All the different IMG tags will make separate requests to the server to display the images. T...
请高手指教
|
If the message came across as text/html content, just send the HTML out as the output of the JSP request. All the different IMG tags will make separate requests to the server to display the images.
The only real problem is if the images come across with the JavaMail message and have a URL that begins with a cid: URL If that is the case, then you deal with sending the image yourself (and saving it locally). You can try to create a protocol handler for cid, but I think the best way is to convert the URL into one that is handled by default, like any other image, with an HTTP request.
The only real problem is if the images come across with the JavaMail message and have a URL that begins with a cid: URL If that is the case, then you deal with sending the image yourself (and saving it locally). You can try to create a protocol handler for cid, but I think the best way is to convert the URL into one that is handled by default, like any other image, with an HTTP request.
您可能感兴趣的文章:
本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。
本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。