|
WebLogic Server 6.1 Code Examples, BEA Systems, Inc. | |||||
See:
Description
| FrameWork Summary | |
| webFramework/actions/Action.java | defines the Action. |
| webFramework/actions/ActionResult.java | defines the ActionResult. |
| webFramework/actions/BaseAction.java | defines the BaseAction that implements Action. |
| webFramework/actions/DateParameter.java | defines the DateParameter that is used in some examples. |
| webFramework/actions/IntParameter.java | defines the IntParameter that is used to validate ints. |
| webFramework/actions/StringParameter.java | defines the StringParameter that is used to validate strings. |
| webFramework/deviceManagement/CategoryParser.java | used to parse the CategoryDefinitions.xml file. |
| webFramework/deviceManagement/Device.java | defines a Device that is used within the framework. |
| webFramework/deviceManagement/DeviceCategory.java | defines a Device Category. |
| webFramework/deviceManagement/DeviceCategoryItem.java | defines a Device Category item. |
| webFramework/deviceManagement/DeviceDefinitionsParser.java | used to parse the DeviceDefinitions.xml file. |
| webFramework/deviceManagement/DeviceInitializer.java | interface to initialize a new device. |
| webFramework/deviceManagement/DeviceManager.java | Manager for devices. |
| webFramework/deviceManagement/DeviceMapping.java | used to help map devices to categories. |
| webFramework/deviceManagement/DeviceOrCategoryParser.java | used to select which parser to use. |
| webFramework/deviceManagement/DeviceSpec.java | used to match a device. |
| webFramework/deviceManagement/DeviceSpecManager.java | used to manage matching devices. |
| webFramework/deviceManagement/UPInitializer.java | used to initialize a UP.Browser device. |
| webFramework/jspSelection/JSPMapping.java | used to help map JSPs. |
| webFramework/jspSelection/JSPRulesParser.java | used to parse the JSPSelectionRules.xml file. |
| webFramework/jspSelection/JSPSelectionRuleManager.java | manages the selection of JSPs. |
| webFramework/jspSelection/JSPSelectionRuleParser.java | used to help parse the JSPSelectionRules.xml file. |
| webFramework/jspSelection/RuleBasedJSPSelector.java | Selects which variant of a JSP page to use based on the accept header. |
| webFramework/util/ConfigFileReader.java | utility to help read a configuration file. |
| webFramework/util/PropertyParser.java | utility to help parse a file. |
| webFramework/util/ReaderStack.java | utility to help push/pop elements. |
This framework is used to illustrate:
The framework is a modifiable, extendable, and flexible framework that can be used for representing device independent pages. Included are several examples, that make use of the framework, provided to demonstrate that from a single URL address, different markup languages can be emitted based on the type of requesting device (web browser, cell phone, pager, PDA, etc.). The framework can be used along with the user-agent string to create device specific markup rather than the generic default markup provided. Also included is a text file, userAgents.properties, with a variety of user-agent strings that have been collected.
The general data flow of the framework is that first a wireless device makes a request using a URL. WebLogic Server then takes the request, figures out what type of device it is, what JSP it is requesting, and then selects and executes a JSP based on the markup language required by the device. The resulting page or deck is sent back to the device.
Using this one type of solution, the device is recognized through the use of the user-agent header and specific information in a XML repository file. The JSP selection part of the framework selects the correct directory (HTML, WML, HDML, etc.) and the named JSP is then executed and the resulting page/deck is sent to the device. For this set of examples the actual name of the JSP is the same across all markup language directories. Regardless of the markup language needed by a wireless device, they all use the action classes to execute a specific action which results in data flowing back to a markup language specific JSP. Note, the developer needs to develop each markup language specific JSP.
Debugging information has been included at various points. It can be turned on/off in each source file (a "debug" variable is used individually).
Important files to look at are:
When debugging is turned on, these files display useful information about the incoming device while developing the application. This can easily be turned off when the application is final.
Perform the following steps to build and configure the framework: (NOTE: this is also done automatically in all the examples that use this framework therefore it is not necessary to perform these steps when building the examples.)
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.
Read more about:
|
Documentation is available at http://e-docs.bea.com/wls/docs61/ |
|||||