![]() |
Enterprise
RTView®
User Guide |
Java Server Pages NOTE: You may not be licensed to run all Enterprise RTView data sources. Requirements
Objective
Setup The demos\dstutorial
directory contains the the following files:
1. In an initialized command window, go to the demos\dstutorial directory. 2. Copy the HTML files, displays
files, and JSP Data Simulator class to your web server directory:
NOTE: If you are using a JSP servlet container other than Tomcat, install these files on your web server according to instructions given with that product. The install_to_tomcat script will not work if the CATALINA_HOME environment variable has not been set. If you did not set this variable following product installation, then return to the product Setup section for details before continuing with this example. Create a Display in the Display Builder 1. Open the Display Builder by typing run_builder in your initialized command window.
2. Login to the Display Builder. By default, the Display
Builder
does not require a login. Login can be
enabled at setup to support
role
based security. The default user name and password are:
NOTE: It is possible that your system administrator may have configured another user name and password. In this case, you may also need to select a role. In the Display Builder, begin by setting up substitutions for the JSP path. 3. Select Tools>Options to open the Application Options dialog and click on the Substitutions tab. 4. In the String field enter $jsp_path. 5. In the Value field enter the location of the jspdata directory when run through your web server (e.g.: http://myhost:myport/jspdata) 6. Click Add to insert this into your list of substitutions. Next, setup the XML Sources. 7. Click on the XML tab: 8. If UnitTable
is already defined in the XML Sources display, double-click on it.
Otherwise, click
Add.
9. Click Save 10. Select No when prompted to save the initialization file in the lib directory. Next, add a label to the Working Area: 11. In the Object Palette window, select the Labels tab and click on the fifth label in the palette (class name: obj_label05). 12. To
attach to data from the JSP Data Simulator, in the Object Properties dialog
set the following properties for the object's label:
13.
In the Attach to XML Data
dialog, enter the following:
14. To
attach data to the object's value, set the following properties
15.
In the Attach to XML Data
dialog, enter the following:
The object's label should display the name of unit A and the object's value should display the status of unit A. Next, set the command to update unit A: 16 In the Object Properties dialog, set the following:
17. In the Define System Command dialog, enter the following:
18. To execute the command, double-click on the object. The status should update to 2. 21. Select File>Save and name this display file as tutorial_jsp.rtv 22. Exit the Display Builder. View Sample Displays in the Display Viewer Sample displays (xml_jsp_data.rtv and xml_jsp_controls.rtv) are provided in the demos\dstutorial directory. These displays illustrate how to drill down to detailed displays, as well as how to use controls to update values on the server. 1. Open the Display Viewer by typing run_viewer in your initialized command window. 2.
Login to the Display Viewer. By default, the Display
Viewer does not require a login. Login can be
enabled at setup to support role
based security. The default user name and password are:
NOTE: It is possible that your system administrator may have configured another user name and password. In this case, you may also need to select a role. 3. Double-click on the XML Displays folder in the tree. 4. Double-click on the Java Server Pages folder. 5. Select Get Data Via JSP in the tree to view the xml_jsp_data.rtv display. If you did not complete the Setup procedures provided at the beginning of this example, you must select Setup in the tree before attempting to view other displays. 6. Click on a row in any of the tables to view the default drill down substitutions and to see more detailed information on these units. 7. Select Set Data Via JSP in the tree to view a display (xml_jsp_controls.rtv) that illustrates the use of controls to update values on the server. 8. Exit the Display Viewer. |
|
|
|
|
|
|
|