skip to main content
Programmer's documentation > Building Web applications > Developing basic JViews JavaScript Web applications > Installing and running the XML Grapher example
 
Installing and running the XML Grapher example
This sample is compatible with the browsers and browser versions listed in the Release notes under Requirements for running Web applications. The example contains a WAR (Web ARchive) file that allows you to install the example on any server that supports the Servlet API 2.1 or later.
This sample requires a Web server and a Web browser that supports JavaScript (for the JavaScript client).
Running on Tomcat
For your convenience, the WAR file is already installed on the Apache Tomcat™ Web server that is supplied with the Rogue Wave® JViews installation. Tomcat is the official reference implementation of the Servlet and JSP™ specifications. If you already use an up-to-date Web or application server, it likely has everything you need. Check the latest list of servers that support servlets at: http://java.sun.com/products/servlet/industry.html.
To run the example on the Tomcat Web server supplied with the Rogue Wave JViews installation:
1. Set the JAVA_HOME environment variable to point to your Java™ Platform, Standard Edition (Java SE) installation.
2. Go to the TOMCAT bin directory located in
 
<installdir>/jviews-framework/tools/tomcat-jsf
3. Depending on your system, run the start_tomcat.bat or the start_tomcat.sh script to start the Apache Tomcat™ server.
4. To see the example, launch a Web browser and open the page:
http://localhost:8080/xmlgrapher/index.html
The Web page gives you access to two different clients: a JavaScript client and a thin Java client.
The Rogue Wave JViews servlets can run with the headless support that is built-in since Java SE 1.5, without an X server. For more information on this feature, refer to the Java SE Release Notes.
Running on WebSphere Application Server (WAS)
The sample can be deployed using the scripts or using the Admin Console.
To run the example on WebSphere Application Server using the scripts:
*Run the command-line instruction ant —f build_was.xml ws.installapp
To run the example on WebSphere Application Server using the Admin Console:
1. Start the WAS server and log in to the Admin Console https://localhost:9043/ibm/console.
Because the WAS server can start on different port numbers, the value is not guaranteed to remain the same. You can use the scripts provided with the samples to obtain the list of port numbers used by the Admin Console and by the deployed Web applications. Run the command-line instruction ant —f build_was.xml ws.list.ports to retrieve the list of port numbers.
2. Expand the left-side Applications menu and click New Application > New Enterprise Application.
3. Enter the path to the WAR file on the local machine, for example, <installdir>/jviews-framework/samples/xmlgrapher/framework-xmlgrapher.war
4. Accept the default Fast Path and click Next.
5. Continue to accept the default values until you reach the context root mapping (step 4).
6. Enter /framework-xmlgrapher
You can then install multiple applications on the Application Server, rather than setting framework-xmlgrapher as the default application.
7. Click Next, then click Finish.
When prompted, save the changes to the server configuration.
8. In the left-side menu, click Applications > WebSphere enterprise applications.
9. Select the framework-xmlgrapher application, and then click Shared library references (towards the end of the list).
10. Check the box next to the module XML Grapher Sample, then click Reference shared Libraries.
11. Click JVIEWS in the list of available shared libraries, then click the right arrow.
JVIEWS appears listed in the box of selected shared libraries (and no longer in the left-side box of available shared libraries).
If JVIEWS is not listed, you must configure the shared library, either by using the supplied scripts or manually.
12. Confirm this change and click Enterprise Applications in the top menu to return to the list of Web applications.
13. Check the box next to the entry framework-xmlgrapher and then select Start to start the server.
14. To run the sample, open a Web browser and view the URL http://localhost:9080/framework-xmlgrapher/
Modify the port as needed to reflect the server configuration.

Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.