This demo is designed for Visual COBOL for Eclipse and shows a Java Web application with a JVM COBOL back-end that runs in Apache Tomcat.
Instructions:
- Download a free copy of Visual COBOL for Eclipse
- Watch the video to see how it's done
- Follow the step-by-step guide to build your own Airport Project
- To import these demo files into Eclipse:
- In the IDE, click File > Import.
- In the Import dialog, expand General and click Existing Projects into Workspace.
- Click Next.
- On the Import Projects page of the Import dialog, click Browse next to Select root directory.
- Navigate to and select the sample folder and click OK. This loads the available project or projects into the Projects pane.
- Ensure the required projects are selected.
- Check Copy projects into workspace and click Finish.
- This imports the demonstration projects in Eclipse and displays them in the COBOL Explorer view.
- To run the demonstration
- Install Apache Tomcat and configure Apache Tomcat:
- Navigate to http://tomcat.apache.org/download-70.cgi
- Navigate to the Binary Distributions section.
- Under Core select a distribution that is suitable for your machine and download the .zip or the .tar.gz archive.
- Extract the contents of the archive to a folder on your machine.
- To run this demonstration in Eclipse:
- Display the Servers view, click Window > Show View > Other.
- Expand Server, click Servers and then click OK.
- In the Servers view, click the new server wizard link.
- Expand Apache, click Tomcat v7.0 Server and click Next.
- Set Tomcat installation directory to the root folder where you extracted the Apache Tomcat distribution and click Next.
- Select AirportWebDemo in the list of the projects in the Available pane.
- Click Add and then click Finish. This adds the project to the Tomcat server. You now need to run the demonstration on that server.
- In COBOL Explorer, right-click the AirportWebDemo project and click Run As > Run on Server.
- Click Tomcat v7.0 Server under localhost in list of existing servers, then click Finish. This open the default application page in a web browser
- You may receive some Windows Security Alert messages - click Allow access in all of them to enable the demonstration to run. The Welcome page of the application is displayed within Eclipse.
- Click Demo. This opens a Web form where you can specify the airport codes of two airports.
- Enter two airport codes and click Submit. This shows the distance between the two airports and also shows the locations of the airport on the world map.
- To stop the application you need to stop the server - in the Servers view, right-click Tomcat v7.0 Server and click Stop.
- You can also access the demonstration application on a mobile device as follows: Start a command prompt on your machine and enter: ipconfig. Take a note of the IP address that is listed under the IPv4 Address. Start a browser on your mobile device. Load the following address in the browser: %IP Address%:8080/AirportWebDemo.
- Install Apache Tomcat and configure Apache Tomcat:
For more information visit: www.microfocus.com/mobile
#VisualCOBOL
#Mobile