You can add application resources to CICS bundles. For
a web application, you might want to provide a URI map that maps the
inbound web requests to run under an application transaction.
Before you begin
To create the application resources, you must have a CICS
bundle project in your Project Explorer. For more information, see
Creating a CICS bundle project. You use this CICS
bundle project to package the application for deployment.
About this task
By default all web application requests use a transaction
called CJSA that is supplied by CICS. However, you can map the application
URI from an inbound request to a different transaction. You might
find this feature useful if you want to securely control access to
the application, because a security administrator can configure CICS
to control which transactions are accessed by users.
Procedure
- Create a definition for the application transaction:
- Right-click the CICS bundle project and click . The Transaction Definition wizard
opens.
- Enter a 4-character name for the transaction. Do
not start the transaction name with C because this letter is reserved
by CICS.
- Enter the program name DFHSJTHP. You must use this CICS program, because it handles the
security checking of inbound web requests to the Liberty profile server.
- Click Finish to create the definition
in the CICS bundle project.
Do not set attributes to create a remote transaction, because
the application transaction must always run in the CICS region where
the web application is running.
- Create a definition for the URI map:
- Right-click the CICS bundle project and click .
- Enter an 8-character name for the URI map. Do not start URI maps names with DFH because this prefix
is reserved by CICS.
- Enter the host name. You can either use a * to
match any host name, or specify the host name of the machine where
your application is going to run.
- Enter the path for the application URI. CICS
matches the URI in the inbound request to the value in the URI map
and runs the application transaction.
- In the Usage section, select JVM Server and
enter the port number for the application.
- Click Finish to create the URI
map.
- Edit the URI map definition:
- Edit the Scheme field to enter the scheme for the URI
map. HTTP is the default, but you can set HTTPS if you want to use
SSL security to encrypt the request. You can use basic
authentication, where a user ID and password is supplied in the HTTP
header, on both HTTP and HTTPS requests.
- Edit the Transaction field to enter the name of the
application transaction.
- Optional: Edit the User ID field to enter
a user ID to run the application request. This value is
ignored if basic authentication is enabled. If you do not supply a
value and the HTTP request does not include a user ID and password,
CICS runs the request under the default user ID of the CICS region.
Results
You created a URI map and a transaction in the CICS bundle
project. When the bundle is deployed and installed, these resources
are created dynamically in the CICS region.
What to do next
You can create additional resources if you want to run different
application operations under different transactions, or if you want
to support both HTTP and HTTPS schemes. If your application is ready
to deploy, see
Deploying a CICS bundle.