SAMPLE: Swiff Chart Generator JSP Samples for IBM WebSphere Application Server 4.0
The information in this article applies to:
- Swiff Chart Generator 2
Warning: The Swiff Chart Generator JSP samples are exclusively running on Unix Systems
Download Sources (JSP code and HTML pages)
Download IBM WebSphere Archives (EAR and WAR files) |
Overview
In this article we walk you through all the steps you must take to run the Swiff Chart Generator JSP samples for IBM WebSphere Application Server V4.0 AES.
Installing and Running the samples from the IBM WebSphere Archives (For Beginners)
Packing, Installing and Running the samples from the JSP files (For Advanced Users)
How to run Application Assembly Tool (AAT)
Installing and Running the samples from the IBM WebSphere Archives (For Beginners).
- Download and unzip the IBM WebSphere Application archives
(Download here).
This archive contains the following ready-made archives:
- Samples.war the Web Module containing the JSP files.
- SwiffChartJSPSamples.ear the Web Application including the Samples.war Web Module.
- Stop WebSphere. To stop WebSphere, execute the stopserver
script located in <WebSphere installation directory>/AppServer/bin.
- Install SwiffChartJSPSamples.ear on WebSphere Application Server.
Use the application installer tool to install the previously created EAR file. The application installer tool is located
in the installation directory of WebSphere Application Server.
cd <WebSphere installation directory>/AppServer/bin
SEAppInstall.sh -install <path>/SwiffChartJSPSamples.ear -interactive false
<WebSphere installation directory>/AppServer/installedApps/SwiffChartJSPSamples.ear/Samples.war
- Run the samples. Now that the JSP files are correctly installed on IBM WebSphere Application
Server, follow the steps below to run the samples:
- Restart WebSphere Application Server. To start and stop WebSphere, execute the startserver and stopserver scripts located in <WebSphere installation directory>/AppServer/bin.
- Launch your Web Browser and type the following URL:
http://<hostname>/swfchart_jsp_samples/index.jsp
Packing, Installing and Running the samples from the Java sources (For Advanced Users).
- Download and unzip the JSP files
(Download here).
This archive contains the following directories:
- the achrive root contains the JSP files and HTML pages.
- the archive jar/ directory contains the Swiff Chart Generator Java package SwiffChart.jar.
- Package the HTML pages and the JSP files into a WAR file.
- Start the Application Assembly Tool (AAT). See How to run Application Assembly Tool.
- Press Cancel at the Welcome to Application Assembly Tool dialog box.
- From the File menu, select New > Web Module.
- From the left pane, select the .war file located on top of the tree and press the right button of the mouse to display the contextual menu.
- From the contextual menu, select Properties.
- From the General tab in the Properties dialog box, type SamplesJspWar in the Display Name edit box and press OK.
- From the left pane, expand the Files folder.
- From the right pane, select the Resource Files folder and press the right button of the mouse.
- From the contextual menu, select Add Files.
- Press Browse..., navigate the disk and select the directory where the downloaded resources have been unzipped. Press Select.
- Select all the HTML pages as well as the all JSP files. Press Add. Press OK. Now the HTML/JSP pages are included in the WAR archive.
- From the right pane, select the JAR Files folder and press the right button of the mouse.
- Press Browse..., navigate the disk and select the jar/ directory of previously downloaded achive. Press Select.
- Select SwiffChart.jar. Press Add. Press OK. Now the SwiffChart.jar file is included in the WAR archive.
- From the left pane, select the Context Parameters folder and press the right button of the mouse to display the contextual menu.
- From the contextual menu, select New.
- In the Parameter name edit box, type SwiffChartInstallDir.
- In the Parameter value edit box, type the absolute path of SwiffChart Generator installation directory. Press OK.
- Save the .war file. From the File menu, select Save As and enter Samples.war as the file name.
- Construct an EAR file containing the WAR file.
- Start the Application Assembly Tool (AAT). See How to run Application Assembly Tool.
- Press Cancel at the Welcome to Application Assembly Tool dialog box.
- From the File menu, select New > Application.
- From the left pane, select the .ear file located on top of the tree and press the right button of the mouse to display the contextual menu.
- From the contextual menu, select Properties.
- From the General tab in the Properties dialog box, type SwiffChartJSPSamples in the Display Name edit box. Press OK.
- From the left pane, select the Web Modules folder and press the right button of the mouse to display the contextual menu.
- From the contextual menu, select Import to navigate to the Samples.war file previously created. Press Open.
- From the resulting dialog box, enter /swfchart_jsp_samples in the Context root edit box.
Note: The Context root specifies the URL that users should type in order to access the application. In this case, if accessing the SampleBarSWF.jsp directly, the URL is:
http://<hostname>/swfchart_jsp_samples/SampleBarJSP.jsp
- Press OK.
- Save the .ear file. From the File menu, select Save As and enter SwiffChartJSPSamples.ear as the file name.
- Close the Application Assembly Tool (AAT) by selecting File > Exit.
- Stop WebSphere. To stop WebSphere, execute the stopserver
script located in <WebSphere installation directory>/AppServer/bin.
- Install the EAR file on WebSphere Application Server SwiffChartJSPSamples.ear.
Use the application installer tool to install the previously created EAR file. The application installer tool is located
in the installation directory of WebSphere Application Server.
cd <WebSphere installation directory>/AppServer/bin
SEAppInstall.sh -install <path>/SwiffChartJSPSamples.ear -interactive false
<WebSphere installation directory>/AppServer/installedApps/SwiffChartJSPSamples.ear/Samples.war
- Run the samples. Now that the JSP files are correctly installed on IBM WebSphere Application
Server, follow the steps below to run the samples:
- Restart WebSphere Application Server. To start and stop WebSphere, execute the startserver and stopserver scripts located in <WebSphere installation directory>/AppServer/bin.
- Launch your Web Browser and type the following URL:
http://<hostname>/swfchart_jsp_samples/index.jsp
Uninstalling the samples
Use the application installer tool to uninstall Web Applications. The application installer tool is located in the installation directory of WebSphere Application Server.
cd <WebSphere installation root>/AppServer/bin
SEAppInstall.sh -uninstall SwiffChartJSPSamples
Note: SwiffChartJSPSamples is the application name entered in the Display name text field of the Properties Dialog Box for the SwiffChartJSPSamples.ear file.
How to run Application Assembly Tool (AAT)
To run the Application Assembly Tool (AAT) follow the steps below:
cd <WebSphere installation directory>/AppServer/bin
assembly.sh
Troubleshooting
If the samples are not running correctly, be sure that Swiff Chart Generator is correctly installed. If Swiff Chart Generator is not installed in its default directory /usr/local/SwiffChart, you must modify the installed JSP files as follow:
-
cd <WebSphere installation root>/AppServer/installedApps/SwiffChartJSPDemo.ear/SwiffChartJSPDemo.war/
- Edit the installed JSP files and replace the following lines:
String installation_dir= "/usr/local/SwiffChart";
- by -String installation_dir= <Swiff Chart Generator installation directory>;
References: |
Keywords: | WebSphere samples JSP |