Embedding a QuickTime movie in a JSP

By: Bruce W. Perry Viewed: 153237 times  Printer Friendly Format    

Similar to using the Java Plug-in, a JSP uses the embed tag inside of an HTML object tag to properly load one of Apple Computer's QuickTime movies. You must include the CLASSID attribute value exactly as the below sample jsp program specifies. You also must include the same CODEBASE attribute value. If the user has an Internet Explorer Windows browser, but has not yet installed the QuickTime ActiveX control, the CODEBASE attribute value specifies where the user can download it.

Embedding a QuickTime movie in a JSP
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>

<jsp:useBean id="date" class="java.util.Date" />

<head><title>QuickTime in a JSP</title></head>
<h2>Ladies and Gentlemen, The Who</h2>

    "clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" WIDTH="320"
    HEIGHT="256" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">

<PARAM name="SRC" VALUE="http://www.parkerriver.com/films/who_bene2.mov">

<PARAM name="AUTOPLAY" VALUE="true">


    WIDTH="240" HEIGHT="196" 
    "true" PLUGINSPAGE="http://www.apple.com/quicktime/download/">



<br /><c:out value="${date}"/>


If the browser uses Netscape-style plug-ins, then the embed tag will initiate the loading of the QuickTime movie. The JSP in above example properly loaded the movie into the Safari web browser on my Macintosh laptop, for instance. One of the advantages of the embed tag is that you can use a number of proprietary attributes that the embedded object, such as QuickTime, understands. The example above pecifies that the movie should start playing as soon as the browser has loaded enough data (AUTOPLAY="true") as well as that the browser should show the movie controls, which lets the user stop or start the movie (CONTROLLER="true").

Most Viewed Articles (in JSP )

Latest Articles (in JSP)

Comment on this tutorial