http://www.longtailvideo.com/support/jw-player/jw-player-for-flash-v5/12538/supported-player-embed-methods#upload javascript
新建eclipse web項目,目錄結構以下,將jwplayer.js 及jwplayer.swf及video分別放到目錄下,按照jwplayer的實例寫index.jsp,啓動tomcat,便可訪問到這個video,將index.jsp的代碼黏貼以下: html
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Insert title here</title> <script type="text/javascript" src="jwplayer/jwplayer.js"></script> </head> <body> <div id="container">Loading the player ...</div> <script type="text/javascript"> var player = jwplayer("container"); player.setup({ flashplayer: "jwplayer/player.swf", file: "videos/video.mp4", height: 270, width: 480 }); //player.play(); </script> </body> </html>