Web Development |
A Panther web application requires its own initialization file whose name is derived from the name of the requester executable, using the format application-name.
ini
.
The default initialization file is named proweb.ini
. On Windows, it is located in the \WINDOWS
directory or where Windows is installed. On UNIX, it is located in ~proweb/ini
. Before you start development of a Panther web application, run the Web Setup Manager utility in your browser. This tool creates the initialization file from settings you specify. For more information on the Web Setup Manager, refer to Appendix B, "Web Setup Manager."
The following sections describe the different types of environment variables that can be found in your application's initialization file. There are variables that determine the behavior of the web application, the Panther environment used by the jserver program, and the database environment.
Setup Variables |
The web initialization file contains an [Environment]
section where you set Panther setup variables such as SMBASE and SMFLIBS. This section also sets the directory path to use for Panther utilities and programs.
Note: Panther variables are case sensitive.
Two variables must be set for two-tier and three-tier applications: SMBASE and SMFLIBS. SMBASE
specifies the location of the web application server installation on the HTTP server.
Some typical settings for SMBASE
are:
SMBASE=/usr/panther
One or more of the following variables must be set in order for the web application server to connect to the middleware as a client:
Required for JetNet/Oracle Tuxedo Applications
UNIX: Windows: SMRBHOST=/home/myapps/broker.bin
SMRBHOST=
Panther-appserver-location
\broker.bin
SMRBHOST
provides the middleware with the network addresses of the machines to which the client can connect; SMRBPORT
provides the port number associated with each machine that the client can use to establish its connection.
The following variables only need to be set under certain conditions, as noted in their descriptions:
Optional Settings
LD_LIBRARY_PATH
must be set to enable three-tier processing for a web application server that resides on a UNIX machine. LD_LIBRARY_PATH
(or its equivalent) must be set to the location of shared Motif libraries. For example:
On HPUX, use LD_LIBRARY_PATH=$SMBASE/lib
SHLIB_PATH
in place of LD_LIBRARY_PATH
; on AIX, use LIBPATH
.
PATH
sets the application's PATH
variable and overrides any existing PATH
settings. Set PATH
to the Panther Web util
subdirectory if the jserver executable is not in it, and to the required database directories if two-tier processing is implemented.
You must provide explicit path names; environment variables are not expanded:
UNIX: Windows: PATH=/home/proweb/util:$PATH
PATH=C:\proweb\util
JAVA_HOME
specifies the location of the Java Virtual Machine program.
com.prolifics.jni.ClassTagFactory
.
UNIX: Windows: CLASSPATH=$SMBASE/config/pro5.jar:$CLASSPATH
CLASSPATH=$SMBASE\config\pro5.jar;%CLASSPATH%
For two-tier applications, the [Environment] section can contain variables needed for your database configuration. For example, the following entry sets these variables for Oracle on UNIX:
Under Windows, installing any Panther database driver except JDB automatically adds a third section, Database Information
ORACLE_HOME=/u/home/oracle
ORACLE_SID=oracle[Database]
, to the initialization file. This section lists the DLLs that Panther should load at startup.
Behavior Variables |
The initialization file's [Prolifics Web]
section contains variables that deter mine the behavior of the web application server. The AppDirectory
, Dispatcher
, LMLicenseFile
, and Server
variables are required; all others can be omitted. To view a sample, refer to "Sample Initialization File."
Note: Web option names are not case sensitive.
The following variables must be set:
AppDirectory
common.lib
and client.lib
, which contains the application's screens, reports, JPL modules, graphics, and other files needed by the application.
The path name must be complete. For example:
UNIX: AppDirectory=/home/webapps/vidorder
Windows: AppDirectory=C:\webapps\vidorder
Dispatcher
UNIX: Dispatcher=/home/proweb/util/dispatcher
Windows: Dispatcher=C:\proweb\util\dispatch.exe
LMLicenseFile
LMLicenseFile
is equivalent to LM_LICENSE_FILE
.
UNIX: LMLicenseFile=/home/prolifics/licenses/license.dat
Windows: LMLicenseFile=C:\proweb\licenses\license.dat
NumServers
NumServers=5
Server
AppDirectory
.
UNIX: Server=/home/proweb/util/jserver
Windows: Server=C:\proweb\util\jserver.exe
The following variables are optional; if omitted, Panther supplies default values as specified.
BrowserData
A value of null or 0 enables server caching; a value of 1 enables browser caching. The default specifies server caching.
BrowserData=0
For more information about caching data, refer to Chapter 6, "Preserving Application State."
CacheDirectory
The cache files for each application are located in a separate subdirectory. The subdirectory name matches the application name.
UNIX: CacheDirectory=/home/proweb/procache
Windows: CacheDirectory=C:\proweb\procache
For more information about caching data, refer to Chapter 6, "Preserving Application State."
ClientLog
UNIX: ClientLog=/home/proweb/logs/client.log
Windows: ClientLog=C:\proweb\logs\client.log
Note:
All the logging variables–ServerLog
, ClientLog
, and ErrorFile
—can point to the same file if desired. The entries are listed in chronological order.
EnableWebid
GET
using webid in the URL by setting this variable to 1.
EnableWebid=1
ErrorFile
sm_web_log_error.
UNIX: ErrorFile=/home/proweb/logs/error.log
Windows: ErrorFile=C:\proweb\logs\error.log
Note:
All the logging variables–ServerLog
, ClientLog
, and ErrorFile
—can point to the same file if desired. The entries are listed in chronological order.
ExpireTime
POST
of a screen before removing the screen's server cache file. The default value is 120 (two hours). Setting this variable to a negative number inhibits expiration of any cache.
ExpireTime=120
HTTPHOST
HTTPHOST=server-name
HTTPSHOST
HTTPHOST
is also set.
HTTPSHOST=server-name
IdleServerTimeOut
Sybase users should set this variable to avoid timeouts in the database server.
IdleServerTimeOut=
ImageDir
For intranets, enter the sub-directory; the machine name is prepended in the HTML:
ImageDir=my_app
For the Internet, enter the protocol, domain name, and document root sub-directory:
ImageDir=http://prolifics.com/my_app
Panther provides internal graphics for displays of scrolling grids, web reports and wizard transaction pages. If you are using any of these graphics in your application and you choose to use the ImageDir
setting, you must copy these internal graphics to that HTTP server directory as well. These graphics have been provided separately in the graphics subdirectory of the Panther web installation.
ListenQueueLength
PadOptionMenus
) in option menus if set to Yes
. To only pad the first occurrence, set this option to First
.
PadOptionMenus=Yes
PadOptionMenus=First
RetainCacheFiles
ExpireTime
option determines how long to retain them before they are deleted.
A value of null or 0 deletes cache files when a screen is submitted on a POST
event; a value of 1 retains the cache file. The default specifies to delete the cache file.
RetainCacheFiles=0
ServerLog
UNIX: ServerLog=/home/proweb/logs/server.log
Windows: ServerLog=C:\proweb\logs\server.log
Note:
All the logging variables–ServerLog
, ClientLog
, and ErrorFile
—can point to the same file if desired. The entries are listed in chronological order.
ServerTimeOut
ServerTimeOut=60
Sample Initialization File |
A sample configuration file on UNIX might contain the following [Prolifics Web]
and [Environment]
sections:
[Prolifics Web]
AppDirectory=/home/webapps/vidstore
ServerLog=logs/server.log
ClientLog=logs/client.log
ErrorFile=logs/error.log
ExpireTime=120
CacheDirectory=/tmp/procache
ServerTimeOut=60
MaxServers=10
Server=/usr/panther/util/jserver
Dispatcher=/usr/panther/util/dispatcher
LMLicenseFile=/usr/panther/licenses/license.dat
[Environment]
SMBASE=/usr/panther
SMFLIBS=client.lib
SMINITJPL=webapp.jpl
PATH=/usr/panther/util
LD_LIBRARY_PATH=/home/motif/usr/lib
SMRBHOST=aspen,willow
SMRBPORT=300,400