Add the example Java™ EE JCAServlet application and
then verify that the Java EE application can call a sample
program in CICS®.
About this task
Complete the following steps to add the Java EE JCAServlet
application. Then, verify that the Java EE JCAServlet
application can call the EC01 sample program in CICS.
Procedure
- Create a JCAServlet class in the Hello World web application. Expand the Hello World project and then expand Java
Resource . Right-click New and select
Servlet.
- For Java package , enter com.ibm.ctg.samples.liberty
- For Class name , enter JCAServlet
Then, click Finish.
- Edit JCAServlet.java and replace all of the code with the CICS example JCAServlet.java from GitHub. For more information, see JCAServlet.java.
- Expand the Hello World project and then expand . Right-click the JCAServlet.java application and select .
- The Liberty server is started and a message is displayed on the Liberty server console that
indicates the URL, which you can click to run the Java EE
application. The following is an example of a message, which might be displayed.
[AUDIT ] CWWKT0016I: Web application available
(default_host):
http://localhost:9080/GenappCustomerSearchWeb/
Results
You can now test and debug the Java EE application in your
local Liberty server.