This sample shows the use of the ECI request classes within
the framework of a servlet.
To compile EciA1, the servlet packages (2.2) javax.servlet and
javax.servlet.http must be referenced in the class path or added to
the <install_path>/samples/java directory.
When the servlet is initialized, it reads values supplied for the
Gateway URL, SSL classname and SSL password if they have been specified
as initialization parameters. Otherwise the default URL is local.
The initial page displays the URL of the connected Gateway daemon
and a number of areas for user input: Server, Program, CommArea Size,
User ID, and Password.
- Server is a combination box containing the names of all the servers
listed in the configuration file (ctg.ini).
- Program is a list limited to EC01 and EC02; these must be available
on the CICS® Server.
- CommArea Size can be set for EC01 only; for EC02 the size is always
50.
- The user ID and password can be specified in the two remaining
text areas.
The servlet takes the submitted data and runs the program, automatically
backing out if the transaction terminates abnormally, or committing
if it runs successfully. The results of the transaction are displayed
on a new page.
You can use a servlet properties file to provide initialization
parameters. The sample servlet looks for the following case-sensitive
parameters:
- GatewayURL
- SSLClassname
- SSLPassword
For example:
servlet.EciA1.initArgs=GatewayURL=tcp://localhost:2006
If
your JEE application server requires Java™ 2
Security permissions, or if you have enabled this facility on your
server, you might have to give the permissions described in
Using a Java 2 Security Manager.
Refer to the documentation for your JEE application server on setting
servlet initialization parameters.