All Examples WAP Examples
Wireless Application Protocol (WAP) Date example
about this example
This example illustrates:
- Connectivity between WebLogic Server and a mobile terminal through a
Wireless Application Protocol (WAP) gateway.
- Generating Wireless Markup Language (WML) documents from within a JSP
- Configuring WAP MIME types within WebLogic Server
- Using Nokia WAP Server as a gateway between WebLogic Server and mobile clients
In this example,
Date.jsp
is accessed by the mobile client (the Nokia WAP simulation client)
and displays the current date and time in the client display.
Date.jsp
is based upon the
ShowDate.jsp page of the JSP
examles. This page has been modified to generate a WML document instead
of an HTML document. The Nokia WAP Server is used
as a gateway and converts WML requests received from the client
to HTTP Servlet requests that are forwarded to
Date.jsp running on
WebLogic Server.
Date.jsp
responds
by sending a generated WML document.
You will need to install the following software to run this example:
how to use this example
Configure the server:
- Verify that the following WAP MIME types are registered
in your weblogic.properties
file.
weblogic.httpd.mimeType.text/vnd.wap.wml=wml
weblogic.httpd.mimeType.application/vnd.wap.wmlc=wmlc
weblogic.httpd.mimeType.text/vnd.wap.wmlscript=wmls
weblogic.httpd.mimeType.application/vnd.wap.wmlscriptc=wmlsc
weblogic.httpd.mimeType.image/vnd.wap.wbmp=wbmp
- Enable JSP pages by un-commenting the following lines in your
weblogic.properties file.
weblogic.httpd.register.*.jsp=\
weblogic.servlet.JSPServlet
weblogic.httpd.initArgs.*.jsp=\
pageCheckSeconds=1,\
compileCommand=/java/bin/javac.exe,\
workingDir=/weblogic/myserver/classfiles,\
verbose=true
Ensure that compileCommand points to a valid Java
compiler that is compatible with your java runtime that you are running the server under (i.e. if
you are running the server under Java2, the compileCommand
should point to the Java2 compiler).
- Copy Date.jsp from this
directory into to your document root.
The document root is the root directory for files that are publically available
on your WebLogic Server. By default it is set to the
/myserver/public_html
directory in your WebLogic installation directory. For more details,
see Setting up a document
root.
Run the example:
Refer to the Nokia documentation for details on starting and administering
the WAP server and for using the WAP Tookit.
- Start the WebLogic Server.
- Start the Nokia WAP Server. You must have the
/bin directory of JRE 1.2.2 in your
PATH to start the Nokia WAP Server.
- Start and log into the Nokia WAP Server Manager (username="admin",
password=""). Ensure that UDP bearer adapter has been started.
- Start the Nokia WAP Toolkit.
- From the Tookit's "Go" menu, select "Load location..."
- In the Open Location dialog, enter:
http://hostname:7001/Date.jsp
where:
- hostname
- Host name of the WebLogic Server
- port
- Port where the WebLogic Server is listening for connections
(weblogic.system.ListenPort).
there's more...
Read more about WAP in
Using
WAP with WebLogic Server.
Read more about JSP in the Developer Guide,
Using
WebLogic JSP.
Copyright © 2000 BEA Systems, Inc.
All rights reserved.