Getting started with the servlet examples

The CICS Explorer® SDK contains examples to help you start developing servlets and JSP pages that can run in a Liberty JVM server in CICS®.

About this task

The servlet examples demonstrate how to use the JCICS API to create simple web applications that can interact with CICS and DB2®. The following examples are provided:
  • CICS Hello World

    This example includes a dynamic web project and a CICS bundle project. It is a very simple web application and has no JCICS API calls. To deploy the application, you can export the CICS bundle project; the dynamic web project is packaged into a WAR file and saved in a zFS directory. Alternatively, you can export the dynamic web project as a WAR file and use FTP to copy the file to the dropins directory of a Liberty JVM server.

  • CICS Temporary Storage Queue (TSQ)

    This example includes an OSGi application project, a dynamic web project, a plug-in project, and a CICS bundle project. It demonstrates best practices by separating the presentation from the business logic and using a CICS bundle to deploy the application.

    The dynamic web project provides the presentation logic; it includes a JSP page and four servlets. The plug-in project provides the business logic; it contains JCICS API calls that access a temporary storage queue in the CICS region. The CICS bundle project packages both projects for deployment.

  • CICS Java™ Database Connectivity (JDBC)

    This example includes an OSGi application project, an OSGi bundle project, a web enabled OSGi bundle project, and a CICS bundle project. It provides a web front end to an existing JDBC sample and demonstrates how to access DB2 data from a Java application in a Liberty JVM server using the CICS JDBC feature.

To get started, follow these steps:

Results

You successfully ran an application in a Liberty JVM server that is running in CICS.

What to do next

You can find other JCICS code examples to help you develop an application that uses CICS services. To add these examples to your workspace, open the New Example wizard and click Examples > CICS Examples > Java > CICS API Examples. These samples can work in a local instance of the Liberty profile or in CICS. Each sample is fully documented.