Web Server Environment
Windows, Apache/Tomcat and Java
  Table of Contents  v-16.01.01 - jvweb101.htm 
  Introduction
  Directory Structure
  Execution, Server
  Web Server Start
  Web Server Shutdown
  Preparation
  Environment Variables
  CATALINA_HOME
  JAVA_HOME
  JRE_HOME
  CLASSPATH
  Technical Details
  Java Server Pages (JSP)
  JSP Declaration Tag
  JSP Scriplets
  JSP Expression Tag
  JSP Directives
  Include Directive
  Page Directive
  Ancillary Functions
  Summary
  Software Agreement and Disclaimer
  Downloads and Links
  Current Server or Internet Access
  Internet Access Required
  Glossary of Terms
  Comments or Feedback
  Company Overview
The SimoTime Home Page 

Table of Contents Previous Section Next Section Introduction

An overview of the system configuration and directory (or folder) structure for a Web Server environment that supports Java, JSP and Beans. An Apache/Tomcat Server running on a Windows System is used for this description.


We have made a significant effort to ensure the documents and software technologies are correct and accurate. We reserve the right to make changes without notice at any time. The function delivered in this version is based upon the enhancement requests from a specific group of users. The intent is to provide changes as the need arises and in a timeframe that is dependent upon the availability of resources.

Copyright © 1987-2019
SimoTime Technologies and Services
All Rights Reserved

Table of Contents Previous Section Next Section Directory Structure

The following shows the directory (or folder) structure used on a Windows/7 and Windows/8 testing system running on a laptop.

                       
C-Drive
   
   
   
   
APACHETC
Apache Tomcat
   
apache-tomcat-7.0.52
Tomcat
   
webapps
Web applications base directory of the host localhost
   
simotcat
   
   
User Web Application
   
   
   
META_INF
   
   
   
   
   
   
images
   
   
   
   
scripts
   
   
   
WEB_INF
   
   
   
   
   
classes
   
   
   
   
   
   
simpacks
Packages…
   
   
   
lib
   
   
   
Program Files (x86)
   
   
   
   
   
Java
   
   
   
   
   
   
jdk1.8.0_112
Java Developer's Kit
   
   
   
   
   
Micro Focus
   
   
   
   
   
Visual COBOL
Micro Focus COBOL
   
   
   
SIMOSAM1
   
   
Base Library for Application
   
   
DEVL
   
   
Base Library for Development
   
   
JAVA
Base Library for Java
 
Library Structure for User Application with Java and Web

Table of Contents Previous Section Next Section Execution, Server

For transaction processing that uses Java Server Pages (JSP) it will be necessary to install and configure a Web Server. The Apache/Tomcat Web Server will be used with this project.

Table of Contents Previous Section Next Section Web Server Start

The following is the user-defined Windows Command file (SYS1TCOPEN.cmd) that is used to start the Apache/Tomcat Server.

@echo OFF
rem  * *******************************************************************
rem  *              SYS1TCOPEN.cmd - a Windows Command File              *
rem  *         This program is provided by SimoTime Technologies         *
rem  *           (C) Copyright 1987-2019 All Rights Reserved             *
rem  *             Web Site URL:   http://www.simotime.com               *
rem  *                   e-mail:   helpdesk@simotime.com                 *
rem  * *******************************************************************
rem  *
rem  * Text   - Start Apache/Tomcat Server.
rem  * Author - SimoTime Technologies
rem  * Date   - January 24, 1996
rem  *
rem  * This user-defined job script will set the necessary environment
rem  * variables and start the Apache Tomcat Server.
rem  *
rem  * Ths script will make calls to the following Windows Command Files.
rem  * 1. ENV1BASE.CMD - this provides a single point for setting commonly
rem  *                   used environment variables.
rem  * 2. SIMONOTE.CMD - this provides a consistent process for displaying
rem  *                   messages to the screen and writing to a journal
rem  *                   or log file.
rem  *
rem  * *******************************************************************
rem  * Step 1, Set the Environment...
rem  *
     set CmdName=SYS1TCOPEN
     call ..\..\ENV1BASE %CmdName%
     if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
     set JobStatus=0000
rem  *
     call SIMONOTE "*******************************************************%CmdName%"
     call SIMONOTE "Starting CmdName %CmdName% - Start Apache/Tomcat Server"
rem  *
rem  * *******************************************************************
rem  * Step 2, Start Apache/Tomcat Server...
rem  *
     call SIMONOTE "CLASSPATH ........ %CLASSPATH%"
     call SIMONOTE "CATALINA_HOME .... %CATALINA_HOME%"
     call SIMONOTE "JRE_HOME ......... %JRE_HOME%"
     call SIMONOTE "Bulletin Startup Tomcat"
rem  *
     set PATHPCFCOMP=%BASELIB1%\SIMOGENS\COMPARES\
rem  * The following call statement will startup the Apache/Tomcat Server
     call %CATALINA_HOME%\bin\startup
rem  * The preceding call statement will startup the Apache/Tomcat Server
     if not ERRORLEVEL = 0 set JobStatus=0010
     if not %JobStatus% == 0000 goto :EojNok
:EojAok
     call SIMONOTE "Finished JobName %CmdName%, Job Status is %JobStatus%"
     goto :End
:EojNok
     call SIMONOTE "ABENDING JobName %CmdName%, Job Status is %JobStatus%"
:End
     if not "%1" == "nopause" pause

Table of Contents Previous Section Next Section Web Server Shutdown

The following is the user-defined Windows Command file (SYS1TCSHUT.cmd) that is used to shutdown the Apache/Tomcat Server.

@echo OFF
rem  * *******************************************************************
rem  *             SYS1TCSHUT.cmd - a Windows Command File               *
rem  *         This program is provided by SimoTime Technologies         *
rem  *           (C) Copyright 1987-2019 All Rights Reserved             *
rem  *             Web Site URL:   http://www.simotime.com               *
rem  *                   e-mail:   helpdesk@simotime.com                 *
rem  * *******************************************************************
rem  *
rem  * Text   - Shutdown Apache/Tomcat Server.
rem  * Author - SimoTime Technologies
rem  * Date   - January 24, 1996
rem  *
rem  * This user-defined job script will set the necessary environment
rem  * variables and shutdown the Apache Tomcat Server.
rem  *
rem  * Ths script will make calls to the following Windows Command Files.
rem  * 1. ENV1BASE.CMD - this provides a single point for setting commonly
rem  *                   used environment variables.
rem  * 2. SIMONOTE.CMD - this provides a consistent process for displaying
rem  *                   messages to the screen and writing to a journal
rem  *                   or log file.
rem  *
rem  * *******************************************************************
rem  * Step 1, Set the Environment...
rem  *
     set CmdName=SYS1TCSHUT
     call ..\..\ENV1BASE %CmdName%
     if "%SYSLOG%" == "" set syslog=c:\SimoLIBR\LOGS\SimoTime.LOG
     set JobStatus=0000
rem  *
     call SIMONOTE "*******************************************************%CmdName%"
     call SIMONOTE "Starting Job Name is %CmdName% - Shutdown Tomcat Server"
rem  *
rem  * *******************************************************************
rem  * Step 2, Shutdown Apache/Tomcat Server...
rem  *
     call SIMONOTE "Bulletin Shutdown Tomcat"
rem  * The following call statement will shutdown the Apache/Tomcat Server
     call %CATALINA_HOME%\bin\shutdown
rem  * The preceding call statement will shutdown the Apache/Tomcat Server
     if not ERRORLEVEL = 0 set JobStatus=0010
     if not %JobStatus% == 0000 goto :EojNok
:EojAok
     call SIMONOTE "Finished Job Name is %CmdName%, Job Status is %JobStatus%"
     goto :End
:EojNok
     call SIMONOTE "ABENDING Job Name is %CmdName%, Job Status is %JobStatus%"
:End
     if not "%1" == "nopause" pause

Table of Contents Previous Section Next Section Preparation

This section describes the preparation work that is required to build a Web Server environment that supports Java, JSP and Beans. Apache/Tomcat running on a Windows System is used for this effort.

Table of Contents Previous Section Next Section Environment Variables

Before running Tomcat the JAVA_HOME and CATALINA_HOME environmental variables must be set correctly.

Table of Contents Previous Section Next Section CATALINA_HOME

This is this location for the top-level directory where the Apache/Tomcat is installed.

CATALINA_HOME=C:\APACHETC\apache-tomcat-7.0.52

Table of Contents Previous Section Next Section JAVA_HOME

The Java Development Kit (JDK) is installed in the following directory. This environment variable is used when the JDK is installed.

JAVA_HOME=C:\Program Files (x86)\Java\jdk1.8.0_112\bin

Table of Contents Previous Section Next Section JRE_HOME

The Java Runtime Environment (JRE) is installed in the following directory. This environment variable is used when the JRE is installed.

JRE_HOME=C:\Program Files (x86)\Java\jre1.8.0_112\bin

Table of Contents Previous Section Next Section CLASSPATH

The following is a list of the "SET" statements that are used to define the CLASSPATH environment variable for a Windows environment.

     set CLASSPATH=.
     set CLASSPATH=%CLASSPATH%;%JAVABASE%
     set CLASSPATH=%CLASSPATH%;%JAVABASE%\lib
     set CLASSPATH=%CLASSPATH%;\%USERCLASS%\simpacks
     set CLASSPATH=%CLASSPATH%;C:\APACHETC\apache-tomcat-7.0.52\webapps\simotcat\WEB-INF\classes
     set CLASSPATH=%CLASSPATH%;C:\APACHETC\apache-tomcat-7.0.52\webapps\simotcat\WEB-INF\classes\simpacks

USERCLASS, BASELIB1 and JAVABASE are user-defined environment variables. The USERCLASS environment variable points to a load library for the application.

     set USERCLASS=%BASELIB1%\LOADLIB

The BASELIB1 environment variable points to a directory and sub-directory structure that is used for development puropses.

     set BASELIB1=c:\SIMOSAM1\DEVL

The JAVABASE environment variable points to the directory where the Java Developers Kit (JDK) is located.

     set JAVABASE=C:\Program Files (x86)\Java\jdk1.8.0_112

Table of Contents Previous Section Next Section Technical Details

WIP

Table of Contents Previous Section Next Section Java Server Pages (JSP)

WIP

Table of Contents Previous Section Next Section JSP Declaration Tag

A Declaration Tag is a block of java code used to declare class wide variables, methods and classes. Whatever is placed inside the Declaration Tags will get initialized during the JSP initialization phase and will have class scope.

<%!  Declaration %>

Table of Contents Previous Section Next Section JSP Scriplets

A JSP scriptlet is used to contain any code fragment that is valid for the scripting language used in a page. The syntax for a scriptlet is as follows:

<%
scripting-language-statements
%>

When the scripting language is set to java, a scriptlet is transformed into a Java programming language statement fragment and it is inserted into the service method of the JSP’s servlet. A programming language variable created within a scriptlet is accessible from anywhere within the JSP page.

Table of Contents Previous Section Next Section JSP Expression Tag

Expression tag is used to display output of data on a generated page. The data placed in an Expression tag prints on the output stream and automatically converts  the data into a string. The Expression tag can contain any Java expression used for printing output equivalent to out.println().Therefore, an expression tag contains a scripting language expression which is evaluated, the data is automatically converted to a String and the outputs are displayed.
Notation of Expression tag is shown below:

<%=
scripting-language-expression
%>

An Expression tag must begin with <%=. Inside the Expression tag, the user embeds a Java expression. The Expression tag ends with the notation %>.

Note:  An Expression should not contain a semicolon between codes, as with a Declaration tag.

Table of Contents Previous Section Next Section JSP Directives

JSP directives provide directions and instructions to the container, telling it how to handle certain aspects of JSP processing. The format for a JSP Directives statement is as follows.

<%@ directive attribute="value" %>

Table of Contents Previous Section Next Section Include Directive

The Include directive is used to copy the content of one JSP page into another. It’s like including the code of one file into another.

<%@include file="myjsp.jsp"%>

Table of Contents Previous Section Next Section Page Directive

The page directive is used to provide instructions to the container that pertain to the current JSP page. You may code page directives anywhere in your JSP page. By convention, page directives are typically placed at the top of the JSP page.

<%@page contentType="text/html" import="java.util.*" %>

Table of Contents Previous Section Next Section Ancillary Functions

This suite of programs references other system and user members in order to function in a larger environment that includes other languages and sub-systems. The following link provides additional details.

Link to Internet   Link to Server   Explore How to use Common or Shared Routines that perform repetitive tasks in a consistent manner. This link will provide information about setting common environment variables and many other utilitarian tasks.

Table of Contents Previous Section Next Section Summary

An overview of the system configuration and directory (or folder) structure for a Web Server environment that supports Java, JSP and Beans. This document may be used to assist as a tutorial for new programmers or as a quick reference for experienced programmers.

In the world of programming there are many ways to solve a problem. This document and the links to other documents are intended to provide a greater awareness of the Data Management and Application Processing alternatives.

The documentation and software were developed and tested on systems that are configured for a SIMOTIME environment based on the hardware, operating systems, user requirements and security requirements. Therefore, adjustments may be needed to execute the jobs and programs when transferred to a system of a different architecture or configuration.

SIMOTIME Services has experience in moving or sharing data or application processing across a variety of systems. For additional information about SIMOTIME Services or Technologies please send an e-mail to: helpdesk@simotime.com or call 415 883-6565. We appreciate hearing from you.

Table of Contents Previous Section Next Section Software Agreement and Disclaimer

Permission to use, copy, modify and distribute this software, documentation or training material for any purpose requires a fee to be paid to SimoTime Technologies. Once the fee is received by SimoTime the latest version of the software, documentation or training material will be delivered and a license will be granted for use within an enterprise, provided the SimoTime copyright notice appear on all copies of the software. The SimoTime name or Logo may not be used in any advertising or publicity pertaining to the use of the software without the written permission of SimoTime Technologies.

SimoTime Technologies makes no warranty or representations about the suitability of the software, documentation or learning material for any purpose. It is provided "AS IS" without any expressed or implied warranty, including the implied warranties of merchantability, fitness for a particular purpose and non-infringement. SimoTime Technologies shall not be liable for any direct, indirect, special or consequential damages resulting from the loss of use, data or projects, whether in an action of contract or tort, arising out of or in connection with the use or performance of this software, documentation or training material.

Table of Contents Previous Section Next Section Downloads and Links

This section includes links to documents with additional information that are beyond the scope and purpose of this document. The first group of documents may be available from a local system or via an internet connection, the second group of documents will require an internet connection.

Note: A SimoTime License is required for the items to be made available on a local system or server.

Table of Contents Previous Section Next Section Current Server or Internet Access

The following links may be to the current server or to the Internet.

Note: The latest versions of the SimoTime Documents and Program Suites are available on the Internet and may be accessed using the Link to Internet icon. If a user has a SimoTime Enterprise License the Documents and Program Suites may be available on a local server and accessed using the Link to Server icon.

Link to Internet   Link to Server   Explore the Java Connection for examples of the various coding or programming techniques using the Java Software Development Kit from Oracle/Sun.

Link to Internet   Link to Server   Explore An Enterprise System Model that describes and demonstrates how Applications that were running on a Mainframe System and non-relational data that was located on the Mainframe System were copied and deployed in a Microsoft Windows environment with Micro Focus Enterprise Server.

Link to Internet   Link to Server   Explore The ASCII and EBCDIC Translation Tables. These tables are provided for individuals that need to better understand the bit structures and differences of the encoding formats.

Table of Contents Previous Section Next Section Internet Access Required

The following links will require an internet connection.

A good place to start is The SimoTime Home Page for access to white papers, program examples and product information. This link requires an Internet Connection

Explore The Micro Focus Web Site for more information about products and services available from Micro Focus. This link requires an Internet Connection.

Table of Contents Previous Section Next Section Glossary of Terms

Link to Internet   Link to Server   Explore the Glossary of Terms for a list of terms and definitions used in this suite of documents and white papers.

Table of Contents Previous Section Next Section Comments or Feedback

This document was created and is copyrighted and maintained by SimoTime Technologies.

If you have any questions, suggestions, comments or feedback please call at 1 415 827-7045 or send an e-mail to: helpdesk@simotime.com

We appreciate hearing from you.

Table of Contents Previous Section Next Section Company Overview

SimoTime Technologies was founded in 1987 and is a privately owned company. We specialize in the creation and deployment of business applications using new or existing technologies and services. We have a team of individuals that understand the broad range of technologies being used in today's environments. Our customers include small businesses using Internet technologies to corporations using very large mainframe systems.

Quite often, to reach larger markets or provide a higher level of service to existing customers it requires the newer Internet technologies to work in a complementary manner with existing corporate mainframe systems. We specialize in preparing applications and the associated data that are currently residing on a single platform to be distributed across a variety of platforms.

Preparing the application programs will require the transfer of source members that will be compiled and deployed on the target platform.

The data will need to be transferred between the systems and may need to be converted and validated at various stages within the process.

SimoTime has the technology, services and experience to assist in the application and data management tasks involved with doing business in a multi-system environment.

Whether you want to use the Internet to expand into new market segments or as a delivery vehicle for existing business functions simply give us a call at 1 415 827-7045 or send an e-mail to: helpdesk@simotime.com

Also, check the web site at http://www.simotime.com


Return-to-Top
Web Server Environment - Windows, Apache/Tomcat and Java
Copyright © 1987-2019
SimoTime Technologies and Services
All Rights Reserved
When technology complements business
http://www.simotime.com