Deploying the servlet examples

CICS® loads and runs Java™ applications from zFS, so you must deploy your compiled applications to a directory in zFS that the CICS region can access. You can use the CICS bundle project that is supplied with each servlet example to deploy the application to a Liberty JVM server that is running in CICS.

Before you begin

  • You must create an example web application, as described in Creating the servlet examples.
  • You must have permission to create and install CICS resources in the region.
  • You must install the WebSphere® Developer Tooling OSGi Application Development feature. See Setting up the development environment.
  • For the CICS Java Database Connectivity (JDBC) example, you must have a sample DB2® database available. To deploy this example, you must create and install a DB2CONN CICS resource definition. Ensure that its status is connected. The DB2 plan that is specified in the CICS DB2CONN definition must be bound with a package list specified as follows:
    PKLIST(NULLID.*)

About this task

The preferred method to deploy and install the applications is to use a CICS bundle project. By using this method you can then use CICS facilities to manage those bundle project application resources. A CICS bundle project packages a set of plug-in projects, dynamic web projects, and CICS resources that are logically deployed and managed as a single unit. You can use this method for simple web applications, such as the Hello World example, and more complex web applications, such as the other servlet examples.

An alternative method to deploy and install the applications is to use the Liberty deployment mechanism to deploy WAR or EBA files. You can export the project as a WAR or EBA file and use FTP to copy the file to the dropins directory of a Liberty JVM server. You can use this method for simple web applications, such as the Hello World example.

Procedure

Results

You deployed a web application that contains servlets and a JSP page to a Liberty JVM server that is running in CICS and configured the Liberty JVM server to use a host name and port number.

What to do next

You can access the web application from a web browser to check the configuration of the Liberty JVM server, as described in Running the servlet examples.