uCosminexus Application Server, System Setup and Operation Guide
Sample program of Web application sample program is stored in the following directory:
Cosminexus-installation-directory\CC\examples\webapps
Following is the overview and execution procedure of the sample program:
You can use the servlet conforming to the specifications of Servlet 2.5 and JSP sample program as a sample of Web application. This section describes the prerequisites, types of sample programs and configuration of the sample programs.
The following are the prerequisites of the sample program of Web application:
Additionally, the sample program of Web application uses JSTL 1.2. You must set a class path in usrconf.cfg in order to use JSTL 1.2. For setting the class path, see 3.4 Setting class path (Setting development environment) in the uCosminexus Application Server Common Container Functionality Guide.
The following are the types of the provided sample programs:
You can use the sample programs of Web application as is as an exploded archive format. The following figure shows the configuration under the Cosminexus-installation-directory\CC\examples\webapps:
Figure M-45 Configuration under the webapps directory
In the execution procedure of the sample programs of Web application explained hereafter, the webapp directory under the Cosminexus-installation-directory\CC\examples is mentioned as webapps directory.
The following procedure describes the execution procedure of the sample program. The following functionalities are used in this procedure:
Compile the servlet, filter and listener of Web application; Java source file of JavaBeans and the JSP file; using the batch file (compile.bat) provided in the sample.
Java source files such as servlet and filter use javac command , and the cjjspc command is used for compiling the JSP files.
See Appendix M.1(1) Setting the J2EE server.
See Appendix M.1(2) Customizing the J2EE server.
See Appendix M.1(3) Starting the J2EE server.
Register the users and roles by using the batch file (setupUsers.bat) provided in the sample. This batch file registers the users and roles for the J2EE server with J2EE server name "MyServer".
Following process is executed by this batch file:
The user name and password registered here are used in the "Security" on the JSP sample page.
See Appendix M.1(5) Importing, setting and starting the application.
Start the browser, specify the following string in the URL and access the top page of the Web application.
http://Machine-name/examples
When you customize the port number, specify ": Port-number" after Machine-name.
Specify the following when you access from the host on which the J2EE server is started.
http://localhost/examples
The following top window is displayed when the access is successful:
Figure M-46 Execution procedure of the sample program of Web application
See Appendix M.1(6) Stopping and deleting the application.
All Rights Reserved. Copyright (C) 2012, 2013, Hitachi, Ltd.