BEA WebLogic User Manual page 27

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

Advertisement

Examples
Here are two versions of a short file that will be transformed by WebLogic Mobility Server. They
demonstrate the way in which the mobility tags are placed into a document. The meaning of the
tags used in these examples will be explained in later sections. The first file uses standard
mmXHTML and is saved as an .htm file. The second file uses the equivalent JSP tag libraries. It
is stored as a .jsp file.
Example 1: hello.htm
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//MOBILEAWARE//DTD MMXHTML 1.2//EN"
"http://www.mobileaware.com/DTD/mmxhtml_1.2.dtd">
<html>
<head>
<title>Hello World!</title>
</head>
<mm-structure id="structure_1" where="IsMenuDriven">
<mm-group-ref idref="mobileGreeting" type="normal" depth="0"
display="all"/>
</mm-structure>
<body>
<p>Hello World!</p>
<mm-include where="IsMenuDriven">
<mm-group id="mobileGreeting">Hello Mobile World!</mm-group>
</mm-include>
</body>
</html>
Example 2: hello.jsp
<%@ taglib uri="mmJSPtaglib" prefix="mm" %>
<mm:page>
<html>
<head>
<title>Hello World!</title>
</head>
<mm:structure id="structure_1" where="IsMenuDriven">
<mm:group-ref idref="mobileGreeting" type="normal" depth="0"
display="all"/>
</mm:structure>
<body>
<p>Hello World!</p>
<mm:include where="IsMenuDriven">
<mm:group id="mobileGreeting">Hello Mobile World!</mm:group>
</mm:include>
</body>
</html>
</mm:page>
Mix mm-tags and mm:tags
Using both mmXHTML and the WebLogic Mobility Server JSP tags in a single file should be
avoided. For optimal processing of JSP files with WebLogic Mobility Server, you should use the
JSP tag library throughout. WebLogic Mobility Server is, by default, configured to generate an
error if mixed tag syntax occurs in a page that is requested from a device other than a PC browser.
In the mis.properties file (located in the WEB-INF/classes folder),
mis.transform.checkMixedTagContent
Part III Fundamentals of Mobile Content
is set to "true". Changing the value of this property to
BEA WebLogic Mobility Server User Guide - 23

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?

This manual is also suitable for:

Weblogic mobility server

Table of Contents