Topic: 在JSP中,如何获取多媒体文件的MIME类型?进而导向不同的Plugin

  Print this page

1.在JSP中,如何获取多媒体文件的MIME类型?进而导向不同的Plugin Copy to clipboard
Posted by: sailorhero
Posted on: 2004-06-23 21:01

开发中,需要在页面上使用流媒体插件,但是文件格式有多种,如何获取文件的Mime信息,进而导向到不同的流媒体插件啊!

2.Re:在JSP中,如何获取多媒体文件的MIME类型?进而导向不同的Plugin [Re: sailorhero] Copy to clipboard
Posted by: scud
Posted on: 2004-06-24 09:28

ServletContext aContext = m_PageContext.getServletContext();

String aContentType = aContext.getMimeType(m_PATHFILE);
if(null==aContentType) { aContentType = "application/octet-stream"; }
m_Response.setContentType( aContentType );


   Powered by Jute Powerful Forum® Version Jute 1.5.6 Ent
Copyright © 2002-2021 Cjsdn Team. All Righits Reserved. 闽ICP备05005120号-1
客服电话 18559299278    客服信箱 714923@qq.com    客服QQ 714923