|
WebLogic Server 6.1 Code Examples, BEA Systems, Inc. | |||||
See:
Description
| StockDemo Example Summary | |
| DisplayStockAlertAction.java | Displays the initial page for the "stockDemo" application. |
| StockAlertAction.java | This class does the actual work of getting the stock quote. It then returns the *ML specific displayPrice.jsp to the requesting mobile device. |
| ControllerServlet.java | This is the controlling servlet that handles all incoming requests. |
| ApplicationSessionManager.java | This class is used for simple session management. |
| ApplicationSession.java | This class is used for simple session management. |
| error.jsp | Default Error page for the StockDemo Application. There are also separate copies of this file for each markup language. (WML, HDML, cHTML, HTML). |
| stockAlert.jsp | source page for the initial jsp that is invoked from the client requesting the ticker symbol. There is a separate copy of this file for each markup language. (WML, HDML, cHTML, HTML). |
| displayPrice.jsp | source page for the jsp that is used to display information to the client. There is a separate copy of this file for each markup language. (WML, HDML, cHTML, HTML). |
| web.xml | Web Application deployment descriptor. |
| CategoryDefinitions.xml | Descriptor file for the underlying framework which defines categories of devices. |
| DeviceDefinitions.xml | Descriptor file for the underlying framework which defines attributes of the devices. |
| JSPSelectionRules.xml | Descriptor file for the underlying framework which defines selection rules for the jsp pages. |
This example illustrates:
In this example, stockAlert.jsp is requested by the mobile client. The JSP generates a page requesting a ticker symbol. The result is a stock quote displayed on the mobile client's display. This application will work properly on a client device that supports HTML, WML, HDML or cHTML. A request is received from the client by the HTTP Servlet which then forwards to the correct stockAlert.jsp running on WebLogic Server for the markup language needed by the device. displayPrice.jsp responds by sending a generated *ML document to the device.
Perform the following steps in order to configure and run the example:
We provide a build script for you to build the example, called build.xml.
The script will build the example and place the files in the correct locations in your WebLogic Server distribution.
| Parameter | Value |
| compile command | JAVA_HOME/bin/javac |
| pageCheckSeconds | 1 |
| verbose | true |
http://hostname:7001/stockDemo/Stockwhere:
Note, if this is not using a locally hosted and configured wireless gateway, a port other than 7001 may have to be used. The safest and most common port that most carriers support is port 80.
Read more about:
|
Documentation is available at http://e-docs.bea.com/wls/docs61/ |
|||||