BEA WebLogic User Manual page 126

Mobility server
Hide thumbs Also See for WebLogic:
Table of Contents

Advertisement

Part V The Delivery Context API
Delivery Context Example
Example: Obtain device information using the JSR188 API
<%@ page contentType="text/html; charset=iso-8859-1" import="javax.ccpp.*" %>
<%@ taglib uri="mmJSPtaglib" prefix="mm"%>
<mm:page>
<%
Attribute screenSize = null;
Attribute imgFormats = null;
Attribute tables = null;
String screenSizeStr = "";
String imgFormatsStr = "";
String tablesStr = "";
ProfileFactory pf = ProfileFactory.getInstance();
Profile myProf = null;
if (pf == null) {
System.out.println("Cannot create ProfileFactory instance.");
}
else {
myProf = pf.newProfile(request);
screenSize = myProf.getAttribute("ScreenSize");
imgFormats = myProf.getAttribute("CcppAccept");
tables = myProf.getAttribute("TablesCapable");
screenSizeStr = screenSize.getValue().toString();
imgFormatsStr = imgFormats.getValue().toString();
tablesStr = tables.getValue().toString();
}
%>
<html>
<head>
<title>DC API</title></head>
<mm:structure id="str1" where="IsMenuDriven"
accesskeycontrol="assignempty">
<mm:group-ref idref="gp1" depth="flat" type="normal" display="all"/>
</mm:structure>
<body>
<mm:group id="gp1" title="API">
<mm:head id="hd1"useradded="no"><b>DC API</b></mm:head>
<mm:body id="bd1" idref="hd1">
<p><strong>Optimal screen size: </strong>
<%= screenSizeStr %> pixels.</p>
<p><strong>Supported image types: </strong>
<%= imgFormatsStr%></p>
<p><strong>Table Support: </strong><%= tablesStr%></p>
</mm:body>
</mm:group>
</body></html>
</mm:page>
122 - BEA WebLogic Mobility Server User Guide

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the WebLogic and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Weblogic mobility server

Table of Contents