jsp中嵌入播放器 jsp中嵌入播放器,怎么无法播放中文的文件,已经修改了Tomcat下的server.xml(URIEncoding=utf-8还是不行,例如,http://localhost:8080/source/中国.wmv,在地址栏直接打入可以播放,但是在嵌入式播放器中却不行,为什么呢 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 举个例子,如果你有一个mp3文件,webroot/music/啊.mp3,可以这么调用,前提是server.xml中一定要加入 URIEncoding="UTF-8"<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html> <head> <title>test</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <meta http-equiv="pragma" content="no-cache"> <meta http-equiv="cache-control" content="no-cache"> <meta http-equiv="expires" content="0"> <meta http-equiv="keywords" content="keyword1,keyword2,keyword3"> <meta http-equiv="description" content="This is my page"> </head> <body> <object id="MediaPlayer1" width="350" height="64" classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112" align="baseline" border="0" standby="Loading Microsoft Windows Media Player components..." type="application/x-oleobject"> <param name="URL" value="music/啊.mp3"> <param name="autoStart" value="true"> <param name="invokeURLs" value="false"> <param name="playCount" value="100"> <param name="defaultFrame" value="datawindow"> <embed src="music/啊.mp3" align="baseline" border="0" width="350" height="68" type="application/x-mplayer2" pluginspage="" name="MediaPlayer1" showcontrols="1" showpositioncontrols="0" showaudiocontrols="1" showtracker="1" showdisplay="0" showstatusbar="1" autosize="0" showgotobar="0" showcaptioning="0" autostart="1" autorewind="0" animationatstart="0" transparentatstart="0" allowscan="1" enablecontextmenu="1" clicktoplay="0" defaultframe="datawindow" invokeurls="0"> </embed> </object> </body></html> 可是,我想用ip地址的方式,因为我的视频资源不放在项目里面而是在Tomcat下的Webapps下的sourse文件夹下的,并且也不一定在我的本机上,所以用相对路径的方式不太合适,不知道你的可以这样吗 用ip地址和这个没有影响!而你文件的放在Webapps的source下,那就改成../source/啊.mp3,两个地方都得改建议你测试一下,在来回复 非常感谢,怎样播放swf格式的文件啊,代码和这个一样吗 request header和response header的max-age为什么不一样? hibernate 的criteria.list()方法 使用委托 Connsection reset可能是什么原因引起的 父页面_子页面跨域访问 关于JSP与excel做自定义报表问题? jsp的路径设置 string 中的“\”用什么字符替代? jsp中怎样使用户关闭窗口的时候取消所有的session呢? java 调用一条linux命令出错了,大家来看看究竟如何调用 关于日期问题(100)分,在在线等(java) jsp 如何上传大文件
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>test</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
</head>
<body>
<object id="MediaPlayer1" width="350" height="64"
classid="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112"
align="baseline" border="0"
standby="Loading Microsoft Windows Media Player components..."
type="application/x-oleobject">
<param name="URL" value="music/啊.mp3">
<param name="autoStart" value="true">
<param name="invokeURLs" value="false">
<param name="playCount" value="100">
<param name="defaultFrame" value="datawindow"> <embed src="music/啊.mp3" align="baseline" border="0" width="350"
height="68" type="application/x-mplayer2" pluginspage=""
name="MediaPlayer1" showcontrols="1" showpositioncontrols="0"
showaudiocontrols="1" showtracker="1" showdisplay="0"
showstatusbar="1" autosize="0" showgotobar="0" showcaptioning="0"
autostart="1" autorewind="0" animationatstart="0"
transparentatstart="0" allowscan="1" enablecontextmenu="1"
clicktoplay="0" defaultframe="datawindow" invokeurls="0">
</embed>
</object>
</body>
</html>