Hitachi

uCosminexus Application Server System Setup and Operation Guide


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:

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:

Figure L‒45: Execution example of the sample program of JSF

[Figure]

The following figure shows the configuration of the sample program:

Figure L‒46: Configuration of the sample program of JSF

[Figure]

(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

See Appendix L.1(1) Setting the J2EE server.

(b) Customizing the J2EE server

See Appendix L.1(2) Customizing the J2EE server.

(c) Starting the J2EE server

See Appendix L.1(3) 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/

(g) Undeploying the application

See Appendix L.1(6) Stopping and deleting the application.

(h) Stopping the J2EE server

See Appendix L.1(7) Stopping the J2EE server.