Quantcast
Channel: Visual COBOL
Viewing all articles
Browse latest Browse all 5819

Wiki Page: Visual COBOL 2.1 - Web Services Environment Configuration

$
0
0

This document describes the steps needed to configure Visual COBOL for Eclipse to work with the JVM servlet APIs and common Java Enterprise Edition (JEE) application servers. It will include the steps needed to configure both the IDE and the server. It will include the steps needed to make the Micro Focus JVM COBOL runtime environment available to deployed web applications. Finally it will include appropriate setup steps for various third party APIs and frameworks that can be used with JVM COBOL.

Setting up the Servlet Container

The servlet container can be either part of a full Java Enterprise Edition (JEE) server (such as JBoss) or an independent server that runs only the container (such as Tomcat). The container manages the deployment, execution and lifetime of servlets and JSPs. It will also manage the privileges a servlet has via the security manager policy set in the configuration of the container. This document will outline how to install several common containers and JEE servers. It will also include details of how to include the Micro Focus JVM COBOL runtime components within the container so that a JVM COBOL application can form part of a servlet based web application.

Setting up Tomcat

To first set up Tomcat you need to acquire the container from the Tomcat website. Navigate to Binary Distributions and download the zip or tar.gz distributions of this server. On all platforms you need to unzip the distribution to a desired direction. On UNIX/Linux platforms this is enough. On Windows you also need to register the service. Open up an administrator command prompt and change to the bin directory of your Tomcat install. Now execute the command service.bat install.

The next step is to include the JVM COBOL runtime in the Tomcat environment so that web applications can depend on it. This is relatively simple. The JVM COBOL runtime on UNIX/Linux is contained in your Micro Focus COBOL install in the lib directory. On Windows it is in the Micro Focus COBOL bin directory. In both cases you want the files mfcobolrts.jar and mfcobol.jar. Copy both of these files into the Tomcat lib directory to make them available at runtime.

Installing the Eclipse Web Tools Platform

The Eclipse Web Tools Platform (WTP) is an environment written for Eclipse that is designed for the creation of web applications. In particular it has in depth support for the Java Enterprise Edition stack. Micro Focus COBOL JVM projects can interact with the WTP to expose COBOL functionality in JEE web services. It can be installed via the normal Eclipse software installer.

Firstly open Micro Focus Visual COBOL for Eclipse. Now click Help in the menu bar and click Install New Software. Now click Add in the Available Software dialog. In the new dialog that pops up select the Name box and enter "Eclipse Web Tools Platform". In the Location box enter the web address "http://download.eclipse.org/webtools/repository/indigo/". This will add the WTP software repository to your Micro Focus COBOL for Eclipse install under the specified name. Click Ok to continue.

Back in the Available Software dialog you will see the word "Pending". Once this vanishes Eclipse will have downloaded the details of the repository and will be ready to install the WTP. Once it appears check "Web Tools Platform (WTP) 3.3.2" and click Next. Then click Next on the dialog showing you the list of packages that will be installed. Accept the license and click Finish. Once the software is installed click Restart Now to ensure Eclipse has installed it properly.

As a quick check to ensure the install was completed you can check that the Dynamic Web Project option is available in the New dialog. Click File in the menu bar and select New->Other. Scroll down to and expand the Web section of this dialog. You should see a Dynamic Web Project option in the dialog. If you do then you have correctly installed the WTP.

Setup of the Server Runtime for Eclipse Web Projects

This section deals with setting up the server runtime so that Eclipse can run and debug a web application on your specified server. The steps can vary from platform to platform.

Setting up the Tomcat Runtime

To set up the Tomcat runtime you need to know the version of the runtime you are setting up. By default Micro Focus supports version 7 of Tomcat but version 6 works similarly. From the appropriate new web project dialog select New Runtime. In the Apache group select the version you support and click Next. Choose the location you have installed Tomcat to by clicking Browse. Select an appropriate JRE (usually the same one as the project) and click Finish.

Installing Eclipse Web Tools Platform Adapters

By default the Eclipse Web Tools Platform has support for a limited number of deployment targets. You need to install a platform specific adapter plugin for every non-default platform. This section deals with the install of server adapters for the supported platforms.

Installing the WASDev adapter for WebSphere

The first step that needs to be taken to install wasdev is to install the Eclipse Marketplace in your instance of Micro Focus Visual COBOL for Eclipse. Then complete the following steps:

  1. Open the marketplace dialog by clicking Help->Eclipse Marketplace...
  2. In the Find box enter "wasdev" and hit the enter key on your keyboard.
  3. A list of WebSphere adapters will be presented. Find the one titled IBM WebSphere Application Server v8.5 Developer and click Install.
  4. Once it finishes loading, deselect the option that reads Dojo Toolkit. This overrides the default WTP project options and will interfere with any tutorial provided by Micro Focus on JVM web services.
  5. Click Next. When it finishes downloading the plugin accept the license and click Finish.
  6. A security warning will pop up about unsigned content. Click OK to dismiss it.
  7. Once the software is installed click Restart Now to ensure Eclipse has installed it properly.

You should now have the option of creating a Dynamic Web Project which links to a WebSphere server instance.

Additional Configuration Details

This section deals with miscellaneous tasks which are in support of JVM COBOL web services but aren't directly about them.

Installing the Eclipse Marketplace

The Eclipse Marketplace is a service by which third party vendors can register plugins for Eclipse. It is necessary to install some components recommended for working with JVM COBOL web services. Start up your Eclipse instance and perform the following:

  1. Open the Install New Software dialogue by clicking on Help->Install New Software...
  2. Click Add in the Available Software dialog.
  3. In the opened dialogue enter "Eclipse Indigo" in the Name field. Enter "http://download.eclipse.org/releases/indigo" in the Location field. Click OK.
  4. When the list of components from the Eclipse Indigo repository have loaded expand the General Purpose Tools entry in the list.
  5. Check the box marked Marketplace Client and click Next.
  6. Click Next on the dialog showing you the list of packages that will be installed.
  7. Accept the license and click Finish.
  8. Once the software is installed click Restart Now to ensure Eclipse has installed it properly.

Viewing all articles
Browse latest Browse all 5819

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>