Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle ADF Business Components interMedia Domains Java API Reference 10g Release 3 (10.1.3) B16008-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.ord.html
Class OrdPlayMediaServlet

`java.lang.Object
javax.servlet.GenericServlet
javax.servlet.http.HttpServlet
oracle.ord.html.OrdPlayMediaServlet`

All Implemented Interfaces:
  java.io.Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig

public class OrdPlayMediaServlet
extends javax.servlet.http.HttpServlet

Interprets the URLs constructed by `OrdURLBuilder`, retrieves multimedia content from the database, and sends the data to the browser.

`OrdPlayMediaServlet` supports both Java Servlet and JSP applications. Internally, it uses `oracle.ord.im.OrdHttpResponseHandler` to deliver binary multimedia content to the browser.

Compared with delivering binary data using ordPlayMedia.jsp, it's safer to use `OrdPlayMediaServlet` to deliver binary data in various JSP container environments. However, it has more steps to setup in the JSP application. To use ordPlayMedia.jsp in a JSP application, user just needs to drop ordPlayMedia.jsp in the JSP page directory. To use `OrdPlayMediaServlet` in a JSP application, web.xml should be edited to map this servlet to an URL pattern. Then use the URL pattern as the custom retrieve path for the interMedia BC4J Data Tags. Eventually, the custom retrieve path will be passed into `OrdURLBuilder` to construct the media fetching URL.

The default release mode for this class is Reserved. Users can change the release mode to Stateful or Stateless through setting up the "releaseMode" init parameter for the servlet.

Note: For discussion on the issues about delivering binary data using a JSP, see notes in ``OrdHttpJspResponseHandler`` .

Below is an example on how to use `OrdPlayMediaServlet` in a JSP applcation:

     Modify web.xml to register OrdPlayMediaServlet.

        <web-app>
           <servlet>
              <servlet-name>myDeliveryComponent</servlet-name>
              <servlet-class>oracle.ord.html.OrdPlayMediaServlet</servlet-class>
              <init-param>
                <param-name>releaseMode</param-name>
                <param-value>Stateless</param-value>
              </init-param>
           </servlet>
           <servlet-mapping>
              <servlet-name>myDeliveryComponent</servlet-name>
              <url-pattern>/myDeliveryComponent</url-pattern>
           </servlet-mapping>
        </web-app>

     Use the servlet in the <jbo:EmbedAudio> tag.

        <jbo:EmbedAudio helperapp="q_player" datasource="ds" mediaattr="Clip"
         whereclause="id=1" retrievepath="myDeliveryComponent" />

Since:
  JDev5.0
See Also:
  `OrdPlayMedia`, `OrdHttpJspResponseHandler`, Serialized Form

Constructor Summary
`OrdPlayMediaServlet()`

Method Summary
`void` | `init(javax.servlet.ServletConfig config)`

Methods inherited from class javax.servlet.http.HttpServlet
`service`

Methods inherited from class javax.servlet.GenericServlet
`destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, log, log`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### OrdPlayMediaServlet

    public OrdPlayMediaServlet()

Method Detail

### init

    public void init(javax.servlet.ServletConfig config)
              throws javax.servlet.ServletException

  Throws:
    `javax.servlet.ServletException`

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle ADF Business Components interMedia Domains Java API Reference 10g Release 3 (10.1.3) B16008-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001,2005, Oracle. All Rights Reserved.