| Oracle® Application Server 10g Multimedia Tag Library for JSP User's Guide and Reference
Part No. B10445-01
Oracle interMedia (" interMedia") provides a custom JavaServer Pages (JSP) tag library that lets users easily generate multimedia HTML tags in JavaServer Pages, and upload multimedia data into interMedia objects.
This chapter briefly describes selected interMedia and Java concepts to show how Oracle Application Server 10g Multimedia Tag Library for JSP ("Multimedia Tag Library") fits into a JSP-based multimedia Web application.
Oracle interMedia enables the Oracle Database software to store, retrieve, manage, and manipulate images, audio, video, and other media data, while integrating it with other enterprise information.
Specifically, Oracle interMedia supports media storage, retrieval, management, and manipulation of media data managed by Oracle Database and stored in one of the following: binary large objects, file-based large objects, URLs that contain media data, and specialty servers. Oracle interMedia media storage and retrieval services enhance the management of Web content.
Oracle interMedia is accessible to applications through both relational and object interfaces. Database applications written in Java, C++, or traditional 3GLs can interact with interMedia through modern class library interfaces, or PL/SQL and Oracle Call Interface.
Oracle interMedia uses object types that are similar to Java or C++ classes to describe media data. These interMedia object types are called ORDAudio, ORDDoc, ORDImage, and ORDVideo. interMedia objects have a common media data storage model.
Oracle interMedia also provides Java Classes to enable users to write Java applications using interMedia objects. Oracle interMedia lets you store your media information in a database table, retrieve it from the table, and manipulate it. Oracle interMedia Java Classes lets you write your own Java applications to use, manipulate, and modify media data stored in the database. Oracle interMedia Java Classes lets an application retrieve an object from a result set and manipulate the contents of the object.
Oracle interMedia Java Classes for servlets and JavaServer Pages (JSP) facilitates retrieving and uploading media data from and to the database.
See Oracle interMedia User’s Guide and Oracle interMedia Reference for additional information about Oracle interMedia and interMedia objects. See Oracle interMedia Java Classes Reference for information about using interMedia objects in Java applications.
Oracle interMedia Java Classes for servlets and JSP uses the OrdHttpResponseHandler class to retrieve media data from an Oracle database and deliver it to a browser or other HTTP client from a Java servlet or JSP page.
Multimedia Tag Library provides media retrieval tags, which JSP developers can use to generate complete HTML multimedia tags or create multimedia retrieval URLs for inclusion in the customized use of an HTML multimedia tag. The media retrieval tags are embedAudio, embedImage, embedVideo, and mediaURL.
Oracle interMedia Java Classes for servlets and JSP uses the OrdHttpUploadFile class to facilitate the handling of uploaded media files. This class provides a simple application programming interface (API) that applications call to load media data into the database.
File uploading using HTML forms encodes form data and uploaded files in POST requests using the multipart/form-data format. The OrdHttpUploadFormData class facilitates the processing of such requests by parsing the POST data and making the contents of regular form fields and the contents of uploaded files readily accessible to a Java servlet or JSP page.
Multimedia Tag Library provides media upload tags, which facilitate the development of multimedia applications that upload media data into the database. The media upload tags are storeMedia, uploadFile, and uploadFormData.
Java is an object-oriented programming language developed by Sun Microsystems. Java programs can run on any computer platform that includes a Java Virtual Machine (JVM). The JVM is a special software environment that compiles the code. It provides the software that the Java program uses to perform tasks including collecting user or system input, displaying information, and allocating memory. Java can be used to develop small Web applications or large network applications.
Java2 Enterprise Edition (J2EE) is an integrated development environment developed by Sun Microsystems that extends the capabilities of the earlier Java2 Standard Edition (J2SE) platform. Among other features, J2EE supports Java servlets, JSP pages, and XML.
Java servlets are Java programs that let Web developers extend and enhance the features of a Web server. Java servlets encourage modular programming using the latest features of the Java language, including Java classes and streams. Java servlets can access the latest Java APIs as well as a collection of calls specific to HTTP. Java servlets are supported on any platform that has a JVM, and a Web server that supports servlets.
Most Java servlets receive requests from a client, generate dynamic HTML text in response, and then send that text back to the client to be displayed by the Web browser. Java servlets can also generate XML text to encapsulate data and send the data to the client or to other parts of the application. Java servlets are often used to create interactive applications.
JavaServer Pages (JSP) technology is an extension of Java servlet technology. It allows users to include portions of Java code in an HTML page or another type of document, such as an XML file.
In a typical JSP page, form is separate from function. The form or layout of information is determined by the JSP page author, while other functions, such as database access, are handled by calls to JavaBeans or by other mechanisms.
All JSP tag libraries extend JSP technology. Typically, JSP tag libraries include specific, modular functions encapsulated within a set of tags that can be used by any JSP page.
Custom JSP tag libraries provide the capability to include Java functions without having to enter Java code specifically. Each JSP tag library defines a specialized sublanguage, thus enabling a more natural use of those Java functions with JSP pages. For example, Oracle Application Server Containers for J2EE (OC4J) provides the JSP Markup Language (JML) Tag Library. Along with other features, JML allows application developers to write JSP pages that include conditional logic and loop constructs without having to use the syntax for Java code scripts directly.
Deciding whether to use Oracle interMedia Java Classes for servlets and JSP or Multimedia Tag Library depends on the type of application you want to develop as well as your level of experience with Java programming.
Java servlets and JSP pages offer flexibility by enabling you to customize the application output. This customization requires a moderate level of skill with the Java programming language, and with servlet and JSP technology. Thus, servlets and JSP pages are best suited for complex applications developed by reasonably experienced Java programmers.
The tags provided by Multimedia Tag Library offer speed and ease of use, allowing you to write simple Java applications requiring little or no customization. JSP tags are appropriate for less experienced Java programmers who want to develop common applications quickly, using limited Java code.