Create one or more servlet examples to understand how to
develop dynamic web projects and OSGi bundles that can run in CICS®.
About this task
Each example is complete and ready to deploy to a JVM server
that is running in CICS. The
examples demonstrate best practice, and show you how to develop an
application that can access DB2® from CICS and a temporary storage queue.
Procedure
- In the CICS Explorer® SDK,
open the Java™ perspective.
- Set the target platform to the latest release
of CICS to work with the servlet
projects. Otherwise compilation errors can occur when you
create the examples in your workspace.
- Click from the workbench
menu bar.
- Expand Plug-in Development and
click Target Platform.
- Click Add to create a target
definition.
- Click the Template radio button
and select the latest
version from
the list.
- Click Next in the wizard and
then click Finish.
- Select the target definition and click OK.
- To create an example, use one of the following methods
to open the New Example wizard:
- In the Eclipse menu bar, click .
- Click the down arrow on the New Wizard icon
and click Example.
- In the Project Explorer view, right-click and click .
- In the folder, select
the example that you would like to use. You can select
from the following examples:
- CICS Hello World
- CICS Java Database Connectivity (JDBC)
- CICS Temporary Storage
Queue (TSQ)
- CICS Link to Liberty
- Click Next. The names
of all the projects that are created for the selected example
are listed.
- Click Finish.
The wizard creates the appropriate projects for the example
you selected. For example, if you selected CICS Temporary Storage Queue (TSQ) or CICS Java Database Connectivity
(JDBC), the wizard creates an enterprise bundle archive (EBA) file,
which contains a WAB file and OSGI bundles. The wizard also creates
a CICS bundle project that
references the EBA file.
Tip: If the project does not
build and the following error occurs, ensure that you completed step
2 successfully:
Bundle 'com.ibm.cics.server' cannot be resolved
Results
The example project is created in the Project Explorer.