oracle.ord.html
Class OrdPlayMediaServlet
oracle.ord.html.OrdPlayMediaServlet
- public class OrdPlayMediaServlet
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
Type | Method |
void |
init(javax.servlet.ServletConfig config)
|
OrdPlayMediaServlet
public OrdPlayMediaServlet()
init
public void init(javax.servlet.ServletConfig config)
throws javax.servlet.ServletException