Consultor Eletrônico



Kbase 18985: Apptivity HTML Project On AS/400 Natively Deployment Testing
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   19/05/2000
Solution ID: 18985

FACT(s) (Environment):

Apptivity 3.x

SYMPTOM(s):

One of the advantages of Java is the feature: "develope once and run anywhere". Having a in pure Java written WebServer and Servletrunner makes any machine, which contains the appropriate JDK, able to function as Webmachine.

Step by step details:

The in pure Java written HTTPServer which comes with the Apptivity product for testing purposes (not for deployment) is the HttpServer from Sun's JSDK to find within the jsdk.jar as Class sun.servlet.http.HttpServer .

A possibility to install Sun's JSDK is by copiing the JSDK classes from the jsdk.jar into Sun's equivalent package directory on the AS/400 machine like described with Solution ID 18860.

After moving to the directory the so created directory structure for the class packages using the ifstools cd command and adding the current path to the classpath with wrkenvvar, if starting the mentioned HttpServer above without any parameters with the AS/400 CL - command:

JAVA CLASS('sun.servlet.http.HttpServer')

Things to still do are:

Since the default servlet dir and document dir for the 'sun.servlet.http.HttpServer' is ./examples :

1. copiing the HTML project deployment files into the examples
directory below the 'sun.servlet.http.HttpServer's
current start directory,
2. adding that directory to the CLASSPATH with wrkenvvar or copiing

<project>servlet.class and <project>.class into the current
servletrunners start directory and
3. check if the contents of the servlet.properties and
<project>.properties file located
inside the ./examples is correct:

Contents of some files of an working example:

a.) servlet.properties :

servlet.AS400HTMLDB.code=AS400HTMLDBServlet
servlet.AS400HTMLDB.initArgs= filename=examples/AS400HTMLDB.properties

b.) Some of <project>.properties to check,
there AS400HTMLDB.properties:

apptivity.naming.host=priorat
apptivity.naming.port=2804
apptivity.project.name=AS400HTMLDB
apptivity.qrypath=examples/
apptivity.agent.apptivityBaseUrl=
apptivity.agent.staticBaseUrl=examples/
apptivity.agent.imageAlias=images
apptivity.agent.stylesheetUrl=AS400HTMLDB.css


c.) The URL for the browser :
http://priorat:8080/servlet/AS400HTMLDB/index.html