L.9 Sample program of JSF
The sample program that uses JSF is stored in the following directory:
Cosminexus-installation-directory\CC\examples\jsf
Following is the overview and execution procedure of the sample:
- Organization of this subsection
(1) Overview of the sample program of JSF
This sample program provides the JSF application for executing the following operations:
-
If you enter a string and click the button, the entered string is displayed on the window.
-
If the entered string has more than 15 characters and you click the button, the message Length is greater than allowable maximum of 15 is displayed on the window.
JSF sample program uses JSF. To use JSF, you must set a class path in usrconf.cfg.
The following figure shows the method of executing the sample program of JSF:
|
The following figure shows the configuration of the sample program:
|
(2) Execution procedure of the sample program of JSF
The following procedure describes the method for executing the sample program:
(a) Setting the J2EE server
(b) Customizing the J2EE server
(c) Starting the J2EE server
(d) Compiling sample programs
Compile the sample programs with the batch file (compile.bat) provided in the sample. This batch file creates a WAR file (helloworld.war) and EAR file (helloworld.ear).
(e) Deploying the application
Use the batch file (deployApp.bat) provided in the sample to deploy the application. See Appendix L.1(5) Importing, setting and starting the application.
(f) Executing the application
Start the browser and specify the following string in the URL:
http://Machine-name: Port-number/helloworld/
When accessing the NIO HTTP server of the J2EE server directly, specify the URL as follows if using the default port:
http://localhost:8008/helloworld/