<COMMENT>(--------------------------------------------------------------------)

<CHAPTER>(Java\chapter_scripting_java)

<P> Java classes may be used to perform CGI scripting with WASD. They may be
designed as standard CGI scripts (with the inevitable latency of the class
loading) or as CGIplus scripts (with the attendant benefit of lower latency).

<P> Note that Java scripts must always be mapped and executed using the
CGIplus path, however some can behave as standard CGI scripts, exiting after
responding to the request, while others can persist, responding to multiple
requests (see <REFERENCE>(chapter_scripting_cgiplus)). The CGIplus path is
always necessary as Java does not have direct access to a process' general
environment, the traditional way of passing CGI variables, so the WASD
implementation uses the CGIplus data stream to provide CGI information. 

<P> WASD provides a class to allow a relatively simple interface to the CGI
environment for both GET and POST method scripts. This and a collection of
demonstration scripts may be found in the

<COMMENT>(....................................................................)

<COMMENT>(HTML=
<A HREF="/ht_root/src/java/">HT_ROOT:[SRC.JAVA]</A>
)

<COMMENT>(HTML/OFF)
HT_ROOT:[SRC.JAVA]
<COMMENT>(HTML/ON)

<COMMENT>(....................................................................)

directory.

<P> Developed using the first-release JDK1.1 beta kit for OpenVMS Alpha V7.1. 

<HEAD1>(Requirements\head_cgi_java_requirements)

<LIST>(UNNUMBERED)

<LE> Ensure the Java class file type is mapped to the Java run-time in the
HTTPD$CONFIG configuration file.

<CODE_EXAMPLE>
  [DclScriptRunTime]
  .CLASS  @CGI-BIN:[000000]JAVA.COM
<ENDCODE_EXAMPLE>

<COMMENT>(HTML=<P>)

<LE> The following content types are configured, also in HTTPD$CONFIG. 

<CODE_EXAMPLE>
  [AddType]
  .CLASS  application/octet-stream  -  Java class
  .JAVA  text/plain  -  Java source
  .JAR  application/octet-stream  -  Java archive
  .PROPERTIES  text/plain  -  Java properties
<ENDCODE_EXAMPLE>

<COMMENT>(HTML=<P>)

<LE> The CGI-BIN logical includes the HT_ROOT:[JAVA] class directory in the
server startup.

<CODE_EXAMPLE>
  $ JAVA_ROOT = F$TRNLNM("HT_ROOT") - ".]" + ".JAVA.]"
  $ DEFINE /SYSTEM /TRANSLATION=(CONCEALED) -
           CGI-BIN 'EXE_ROOT','SCRIPT_LOCAL_ROOT', -
           'SCRIPT_ROOT','JAVA_ROOT'
<ENDCODE_EXAMPLE>

<ENDLIST>

<COMMENT>(--------------------------------------------------------------------)
