Creating a URI map and transaction

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

  1. Create a definition for the application transaction:
    1. Right-click the CICS bundle project and click New > Transaction Definition. The Transaction Definition wizard opens.
    2. Enter a 4-character name for the transaction. Do not start the transaction name with C because this letter is reserved by CICS.
    3. 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.
    4. 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.
  2. Create a definition for the URI map:
    1. Right-click the CICS bundle project and click New > URI Map Definition.
    2. Enter an 8-character name for the URI map. Do not start URI maps names with DFH because this prefix is reserved by CICS.
    3. 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.
    4. 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.
    5. In the Usage section, select JVM Server and enter the port number for the application.
    6. Click Finish to create the URI map.
  3. Edit the URI map definition:
    1. 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.
    2. Edit the Transaction field to enter the name of the application transaction.
    3. 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.