To ease migration of existing WebSpeed applications, an
OpenEdge.Web.Compatibility handler is supplied in the netlib/OpenEdge.Net.pl libraries. This class implements the same Progress.Web.IWebRequest interface as OpenEdge.Web.WebHandler, in a way that allows many simple classic WebSpeed applications to run on PAS unmodified with all their original functionality.
To migrate a simple classic WebSpeed application to PAS:
- Create a new PAS instance if an instance has not already been created. The instance directory will be referenced using the environment variable CATALINA_BASE in the steps below. Refer to the Documentation references below for how to create a PAS instance from the command line or in OpenEdge Explorer.
- Decide whether to use the ROOT webapp or a named webapp for the migrated application. There can only be one ROOT webapp; using named webapps allows more than one classic WebSpeed application to be migrated to the same instance.
- Create a named webapp if needed and publish it to the PAS instance. Refer to the Documentation references below for how to create an ABL Web App project in Progress Developer Studio for OpenEdge
- Optionally, copy application r-code to ${CATALINA_BASE}/webapps/<webapp>/WEB-INF/openedge,
where "<webapp>" is the name of the named webapp or "ROOT" for the ROOT webapp.
If the r-code is in a directory hierarchy in the classic WebSpeed application, copy the files to that same hierarchy in the target directory. - Copy static files used by the WebSpeed application to ${CATALINA_BASE}/webapps/<webapp>/static/webspeed (the default location), or another directory under ${CATALINA_BASE}/webapps/<webapp>
- If any modifications have been made to the web/objects/web-util.p to support your classic WebSpeed application, migrate them to the newer version of web/objects/web-util.p where significant changes have been implemented to support running in a multi-session agent (_mproapsv)
- In ${CATALINA_BASE}/conf/openedge.properties:
- Locate the [AppServer.Agent.<CATALINA_BASE>] node (look for the actual instance name in place of <CATALINA_BASE>) .
- If necessary, modify the PROPATH property to include the r-code directory. If the r-code was copied to ${CATALINA_BASE}/webapps/<webapp>/WEB-INF/openedge in step 4, the directory will probably already be there.
- If necessary, add database connection(s) to the agentStartupParam property of the instance node using the -db or -pf startup parameter.
- Locate the [<CATALINA_BASE>.<webapp>.WEB] node, where "<CATALINA_BASE>" is the instance name and "<webapp>" is the name of the named webapp or "ROOT" for the ROOT webapp.
- If necessary, modify the wsRoot property to specify the directory where the static files are located. Make sure the directory specification begins with "/" and is relative to ${CATALINA_BASE}/webapps/<webapp> (<webapp> may be "ROOT"). If the static files were copied to ${CATALINA_BASE}/webapps/<webapp>/static/webspeed in step 4, the directory specification will probably already be correct.
- Specify "1" for the adapterEnabled property.
- Confirm that the defaultHandler property is set to "OpenEdge.Web.CompatibilityHandler"
- Start the PAS instance. See the documentation references below for how to start a PAS instance from the command line or from OpenEdge Explorer.
- The URL to run the WebSpeed application on PAS will be in one of the following forms:
http://<host>[:port]/web/<path to r-code>
For example:
http://localhost:8810/web/getCustomer.r
http://<host>[:port/<webapp>/web/<path to r-code>
For example:
http://localhost:8810/marketing/web/getCustomer.r
The path to the r-code is relative to the Propath.
Note: To just run an ABL procedure from PASOE, the include file, "{src/web/method/e4gl.i}" will need to be added to the ABL procedure as well as
"PROCEDURE local-e4gl-options" that is invoked by e4gl.i.
Example:
/*out.p*/
{src/web/method/e4gl.i}
{&OUT} "Something here".
FOR EACH state:
{&OUT} statename "<br>".
END.
/* This procedure returns the generation options at runtime.
It is invoked by src/web/method/e4gl.i included at the start
of this file. */
PROCEDURE local-e4gl-options :
DEFINE OUTPUT PARAMETER p_version AS DECIMAL NO-UNDO
INITIAL 2.0.
DEFINE OUTPUT PARAMETER p_options AS CHARACTER NO-UNDO
INITIAL "web-object":U.
DEFINE OUTPUT PARAMETER p_content-type AS CHARACTER NO-UNDO
INITIAL "text/html":U.
END PROCEDURE.
Classic WebSpeed applications that use the following features cannot be migrated in this way:
- WebSpeed applications that use HTML mapping are not supported.
- WebSpeed applications with a modified web-disp.p and supporting files will need the custom Web Handler, web-handler.p, to implement the necessary customizations. This file can be found in $DLC\src\web\objects\web-handler.p.