Notices References in this publication to IBM products, programs, or services do not imply that IBM intends to make these available in all countries in which IBM operates. Any reference to an IBM product, program, or service is not intended to state or imply that only that IBM product, program, or service may be used. Any functionally equivalent product, program, or service that does not infringe any of the intellectual property rights of IBM may be used instead of the IBM product, program, or service. The evaluation and verification of operation in conjunction with other products, except those expressly designated by IBM, are the responsibility of the user. IBM may have patents or pending patent applications covering subject matter in this document. The furnishing of this document does not give you any license to these patents. You can send license inquiries, in writing, to the IBM Director of Licensing, IBM Corporation, 500 Columbus Avenue, Thornwood, NY, USA 10594. IBM may change this publication, the product described herein, or both.
Trademarks The following terms are trademarks of the IBM Corporation in the United States or other countries or both: AIX IBM OS/2 VisualAge
The following terms are trademarks of other companies: Microsoft Netscape Windows UNIX
Microsoft Corporation Netscape Inc. Microsoft Corporation X/Open Company Limited
Windows is a trademark of Microsoft Corporation. UNIX is a registered trademark in the United States and other countries licensed exclusively through X/Open Company Limited.
About this book This book documents the VisualAge Web Connection feature, which you can use to build VisualAge applications that are accessible from World Wide Web browsers.
What this book includes This book includes the following information: v Introductory information, including information on setting up Web Connection and your Web server. v Information on building Web Connection applications, including using the visual parts, non-visual parts, page layout tools, database parts, and how to process requests. v Information on using other HTML builders, such as FrontPage, with Web Connection. v Information on packaging your application. v Information on special Web Connection tools. v Advanced topics such as session data, generating HTML from Smalltalk, error handling, and execution control.
Who this book is for This book is written for VisualAge application developers who want to create World Wide Web applications. If you are not already familiar with developing VisualAge applications, refer to VisualAge Getting Started and the VisualAge User’s Guide. These books provide an introduction to the concepts involved in object oriented programming, Visual programming and using the VisualAge tools.
About this feature The VisualAge Web Connection feature enables you to use VisualAge to build applications that are accessible through the World Wide Web. With the Web Connection feature, you use the VisualAge Composition Editor to build dynamic Web pages, much as you would build windows for an ordinary graphical user interface. The Web pages you build provide the user interface for your application, and you implement program logic by making connections and writing Smalltalk scripts, just as you would with any VisualAge application.
What’s new in this version? In VisualAge Smalltalk Version 5.1, the Web Connection feature adds support for the following: HTML file wrapper The HTML File Wrapper allows you to use other HTML builders for more robust web page creation but still use Web Connection and Smalltalk to perform data manipulation and presentation.
Conventions used in this book This book uses several conventions that you might not have seen in other product manuals. Tips and environment-specific information are flagged with icons: Shortcut techniques and other tips VisualAge for OS/2 VisualAge for Windows VisualAge for UNIX platforms
These highlighting conventions are used in the text: Highlight style Boldface
Italics
Used for
Example
New terms the first time they are used
VisualAge uses construction from parts to develop software by assembling and connecting reusable components called parts.
Items you can select, such as push buttons and menu choices
Select Add Part from the Options pull-down. Type the part’s class and select OK.
Special emphasis
Do not save the image.
Titles of publications
Refer to the VisualAge Smalltalk User’s Guide.
Text that the product displays
The status area displays Category: Data Entry.
VisualAge programming objects, such Connect the window’s as attributes, actions, events, composite aboutToOpenWidget event to the parts, and script names initializeWhereClause script. Monospace font
VisualAge scripts and other examples doSomething of Smalltalk code | aNumber aString | aNumber := 5 * 10. aString := 'abc'. Text you can enter
Building forms . . . . . . Creating a form . . . . . Adding parts to a form . . Using divisions . . . . . . Using layers . . . . . . . Using framesets . . . . . . Using style sheets . . . . . Adding scripts . . . . . . Example: Building the To-do List Coding HTML directly . . .
. iii
About this book . . . . . . . . . . . v What this book includes . . Who this book is for. . . . About this feature . . . . What’s new in this version? . Conventions used in this book
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . .
v v v v . vi
Chapter 1. Introduction to Web Connection . . . . . . . . . . . . . 1 What you get with Web Connection Web Connection parts . . . . Web Server Interface . . . . . Application flow . . . . . . URL format. . . . . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
. . . . .
|
. . . .
Selecting grids, cells, rows, and columns. Adding and deleting rows and columns . Adding parts to a grid. . . . . . .
1 1 2 3 3
Retrieving form data . . . . . . . Setting up Form Data . . . . . . Preserving session data . . . . . . What defines a session? . . . . . Setting up CGI Link Session Data . . Using Cookies . . . . . . . . . Connecting to the nonvisual parts . . . Example: Making the To-do List work Processing requests . . . . . . . . Accessing request data . . . . . Routing requests to different pages . Example: Routing requests . . . . Using multiple pages in the same part
7 8 9 9
12 12 13 17 18 18 18
. 19 . 20 . 21
Chapter 3. Building a Web Connection application . . . . . . . . . . . . . 25 A Hello World application An input and reply sample Building the input page Building the reply page
Chapter 2. Setting up Web Connection . 7 Setting up the Web Connection server interface . . Setting up the Servlet interface . . . . . . Setting up the Server Smalltalk interface . . . Setting up for CGI . . . . . . . . . . Setting up for the IBM Internet Connection API (ICAPI) . . . . . . . . . . . . . . Setting up for Microsoft Internet Server API (ISAPI) . . . . . . . . . . . . . . Setting up for Netscape Server (NSAPI) . . . Customizing the WSI configuration file . . . Setting Web browser launch options . . . . . Testing your installation . . . . . . . . . Test the Http server . . . . . . . . . Test the web server interface configuration . . Setup and test your WSI and VisualAge image configuration . . . . . . . . . . . . Troubleshooting Hello, World! . . . . . . Using the WSI monitor interface . . . . .
Creating a runtime image. . . . Setting up the runtime system . . Server configuration file format.
. . .
. . .
. . .
. . .
. . .
. 61 . 61 . 62
Chapter 10. Using Web Connection for server applications . . . . . . . . . 63 Setting up Web Connection for OS/390 . . . . Setting up the ICAPI web server interface . . Running a VisualAge Smalltalk web application . More information about VisualAge Smalltalk web applications and OS/390 . . . . . . . . .
Chapter 1. Introduction to Web Connection The VisualAge Web Connection feature enables you to use VisualAge to build applications that are accessible through the World Wide Web. With the Web Connection feature, you use the VisualAge Composition Editor to build dynamic Web pages, much as you would build windows for an ordinary graphical user interface. The Web pages you build provide the user interface for your application, and you implement program logic by making connections and writing Smalltalk scripts, just as you would with any VisualAge application.
What you get with Web Connection The Web Connection feature provides two main components that make it possible to build Web-based applications with VisualAge: v A set of visual and nonvisual parts designed for building Web applications. The parts are in the Web Connection category and the Web Form Parts category, which are added to the Parts Palette when you load the Web Connection feature. v A Web server interface. This component acts as a relay between your Web server and your VisualAge application. The Web server interface component must be installed on your HTTP server machine, which can be either the same machine as the VisualAge machine or a different machine.
Web Connection parts When building web pages, the visual parts in the Web Connection and Web Form Parts categories are used instead of standard VisualAge visual parts. They represent the various entities and controls that can be displayed by a Web browser. You cannot use any other visual parts in the user interface of a Web application. However, you can still use any VisualAge nonvisual part in your application logic. All of the features of VisualAge, such as database access and communications, are available to your Web application. The parts in the Web Connection categories are special VisualAge parts that have the ability to translate themselves into HTML code. At run time, instead of creating windows and user-interface controls on your screen, the parts generate HTML code that recreates your user interface in a Web browser. Incoming requests from Web browsers trigger the generation of HTML code by the application. Because HTML and Web browsers support only certain functions, the Web Connection categories contain only a limited set of UI controls. Furthermore, when you build a Web page, you will find that the editing behavior of the Composition Editor is somewhat different from when you build an ordinary VisualAge application. Again, this is because the architecture of HTML does not support as many options for customization and precise placement. The Web Connection feature supports only what HTML supports, and it will not let you build a user interface that won’t work on the Web. Other HTML builders, such as FrontPage, may provide more robust HTML page creation. To use other HTML builders to create HTML pages, but still use Web Connection and Smalltalk to perform the data manipulation and presentation for the HTML pages, see “Chapter 7. Using Web Connection with other HTML Builders” on page 51.
Web Server Interface In order to run your Web application, you must also be running a Hypertext Transfer Protocol (HTTP) server that can run server programs in response to client requests. The HTTP server relays requests to the VisualAge application through a Web server application interface. There are several interfaces through which Web servers can access a Web Connection application (for more information about these interfaces, see “Setting up the Web Connection server interface” on page 7): v Servlet Interface v Common Gateway Interface (CGI) v IBM Internet Connection API (ICAPI) v Netscape Server API (NSAPI) v Microsoft Internet Server API (ISAPI) v Server Smalltalk
| | | |
You can also use Server Smalltalk with Web Connection. In this case Server Smalltalk acts as a server. The response time is much faster using Server Smalltalk than using one of the Web server interfaces. The Servlet interface offers several advantages over the other Web Server interfaces: v Better performance than CGI. The router servlet supplied with Web Connection is loaded once and reused on subsequent invocations. Conversely, the CGI executable is reloaded upon each invocation and must reread the WSI configuration file. v Cookie support. Support for HTTP cookies is provided using the servlet interface only. Other supplied web server interfaces do not provide support for cookies. v Portability. Since the router servlet is written in Java, it can be used with any web server that supports servlets on any platform. v Simple configuration. Configuring the servlet interface is very straightforward compared to the other supplied web server interfaces.
| |
The Web Connection feature provides a Web Server Interface (WSI) module for each of the supported interfaces. For CGI, the interface is through a stand-alone executable program; for the others, it is through a dynamically loaded shared library. The interface module handles all interaction with the VisualAge application, which stays up and running all the time. This arrangement provides several advantages: v It optimizes performance. Without a separate interface module, the Web server would have to start the VisualAge application with each request. This would result in unacceptable performance, because of the overhead involved in loading a Smalltalk image. v It makes it possible to preserve state information within the VisualAge application. Because the application stays running all the time, it can store information between one client request and the next. v It makes it simple to change Web server application interfaces (for example, you might decide to switch your server to use ICAPI instead of CGI to access the VisualAge application). Changing the Web Server Interface module does not require any change to the VisualAge application itself. On your Web server, you must set up the appropriate interface module so that it is accessible to your HTTP server software. Web clients can then access your
2
VisualAge Smalltalk: Web Connection User’s Guide
VisualAge application by submitting requests to the Web server, which then calls the appropriate interface module. The interface module then relays the client request to the VisualAge application. The VisualAge application receives these requests, and returns the results, by way of the WSI server, a process running within the VisualAge image.
Application flow A single request from a Web client, and its results, follow a multi-step process: 1. The client Web browser submits an HTTP request that specifies a VisualAge Web Connection part. 2. The HTTP server (a daemon running on the specified host) receives the request from the client. The server parses the request and calls the Web Server Interface module, passing it any additional information contained in the URL. 3. The Web Server Interface module passes the client request to the running VisualAge application, communicating through a TCP/IP socket. (The VisualAge image can be either on the same machine as the HTTP server or on a different machine.) The request consists of a VisualAge part name and a variable number of optional parameters. 4. The WSI server, a process running within the VisualAge image, receives the request from the interface module and creates a new instance of the specified VisualAge Web Connection part. The WSI server also parses any parameters from the request and makes them available to the new part as attributes on a subpart. 5. The part processes the input data and generates an HTML data stream, which is relayed back through the interface module and the HTTP server to the client browser, which renders the page. Most of this process is completely invisible to the client Web browser. From the client’s perspective, the pages generated by the VisualAge application do not appear any different from any other Web pages. Browser
HTTP Server
VisualAge CGI program (NSAPI, ICAPI, ISAPI)
VisualAge Web Connection Runtime Image
DB2, IMS, CICS, Oracle, etc.
Static Assets (HTML, GIF, etc.)
MVS
URL format To access a VisualAge Web Connection application, the client Web browser sends an HTTP request. A user can generate such a request in any of three ways: v Directly specifying the Uniform Resource Locator (URL) for the servlet or CGI program v Selecting a link in an HTML document that specifies the URL for the servlet or CGI program
Chapter 1. Introduction to Web Connection
3
v Selecting the “submit” button on an HTML fill-out form that specifies the servlet or CGI program as the action to take In any case, the request sent by the Web browser takes the form of a URL containing the HTTP request and any data that goes along with it. The complete URL to a VisualAge Web Connection application takes on various forms, depending on the interface used.
Servlet interface URL For the Servlet interface, the URL is in the following form: http://server/servletPath/servletName/VisualAgePartName
for example: http://MyServer/servlets/com.ibm.abt.web.servlet.Router/myClass
where the parts of the URL are as follows: server The TCP/IP host name, and optionally the port, of the HTTP server. servletPath The path defined as the directory for servlets on the server machine. This path is defined when you install a Web Server that supports servlets, such as the IBM WebSphere Application Server. servletName The name of the servlet used to interface with the Web server. Web Connection ships with the servlet com.ibm.abt.web.servlet.Router. VisualAgePartName The name of the VisualAge part to open in response to this request. | |
Note: Under WebSphere, the URL format example is:
|
Server Smalltalk interface URL
http://MyServer/servlet/Router/myClass
For the Server Smalltalk interface, the URL is in the following form: server:port/AbtWebConnect/VisualAgePartName
for example: MyServer:1332/AbtWebConnect/myClass
where the parts of the URL are as follows: server:port The TCP/IP host name and port of the HTTP server. AbtWebConnect The name of a class included with Server Smalltalk, needed to use Server Smalltalk as a Web server with Web Connection. VisualAgePartName The name of the VisualAge part to open in response to this request.
CGI interface URL For CGI, the URL is of the following form: http://server/cgiPath/cgiName/VisualAgePartName
for example: http://MyServer/cgi-bin/abtwsac.exe/MyClass
4
VisualAge Smalltalk: Web Connection User’s Guide
where the parts of the URL are as follows: server The TCP/IP host name, and optionally the port, of the HTTP server. cgiPath The path defined as the directory for CGI executables on the server machine (typically cgi-bin). cgiName The name of the Web Server Interface CGI executable on the server (usually abtwsac.exe or abtwsac). VisualAgePartName The name of the VisualAge part to open in response to this request.
IBM ICAPI and Netscape NSAPI interface URL For IBM ICAPI and Netscape NSAPI, the URL is of the following form: http://server/wsiMapping/VisualAgePartName
for example: http://MyServer/abtwsi/MyClass
where the parts of the URL are as follows: server The TCP/IP host name, and optionally port, of the HTTP server. wsiMapping The mapping defined on the server machine for the WSI interfaces (typically abtwsi). VisualAgePartName The name of the VisualAge part to open in response to this request.
Microsoft ISAPI interface URL For Microsoft ISAPI, the URL is of the following form: http://server/cgipath/dllName/VisualAgePartName
for example: http://MyServer/cgi-bin/abtwsi/MyClass
where the parts of the URL are as follows: server The TCP/IP host name, and optionally port, of the HTTP server. cgipath The path defined as the directory for CGI executables on the server machine (typically cgi-bin). dllName The name of the Web Server Interface DLL on the server (abtwsam.dll). VisualAgePartName The name of the VisualAge part to open in response to this request.
Chapter 1. Introduction to Web Connection
5
6
VisualAge Smalltalk: Web Connection User’s Guide
Chapter 2. Setting up Web Connection In order to use the Web Connection feature, you must set up your Web server to run programs in response to client requests. The Web Connection feature receives requests from the Web server software and returns results, in the form of an HTML data stream, through the server back to client browsers. VisualAge Web Connection can use any of several Web server interfaces: v The Servlet Interface. The Servlet interface works with any Web server that supports Java Servlets. For information on setting up your server to handle servlets, refer to the documentation for your HTTP server software. v VisualAge Server Smalltalk. If you have a license for Server Smalltalk, you can use use Smalltalk as a Web server with your Web Connection parts. v The Common Gateway Interface (CGI). CGI, which is supported by most Web servers, is the most common interface that defines how HTTP servers can run external programs. CGI supports running stand-alone executable programs in response to client requests. For information on setting up your server to handle CGI requests, refer to the documentation for your HTTP server software. v The IBM Internet Connection API (ICAPI). ICAPI is a shared-library-based interface supported by the IBM Internet Connection Server and Lotus Go Webserver. v The Netscape Server API (NSAPI). NSAPI is supported by the Netscape Web server software. Instead of running stand-alone programs, NSAPI uses shared libraries to extend the server software’s capabilities. v The Microsoft Internet Server API (ISAPI). ISAPI is a shared-library-based interface supported by Microsoft Web server software. Generally speaking, the server-specific interfaces that use shared libraries offer several advantages over CGI. Most importantly, they typically offer better performance and more efficient use of system resources. If you are using the IBM, Netscape, or Microsoft server software, you should probably use the corresponding interface. For other HTTP servers that support servlets, use the Servlet interface. Otherwise, use CGI. For more information on setting up your Web server to run external programs, refer to the documentation for your Web server software.
Setting up the Web Connection server interface The Web Connection feature includes a component called the Web Server Interface (WSI). WSI provides the link between your Web server software and your VisualAge application. The VisualAge image where the application processing occurs can be running either on the same machine or a separate machine. | | | | | | |
When you install the Web Connection feature, a subdirectory called webconn is created. This directory contains all of the WSI files you will need to set up your Web server interface. Before VisualAge can receive requests from Web clients, you must install the appropriate files in the correct locations on your Web server. The files are divided by operating system. To find the correct files, go to the webconn directory tree and look in the subdirectory for your operating system (OS/2, Windows, AIX, HP-UX, or Sun). The files are:
If your VisualAge application and your Web server are on two separate machines running different operating systems, make sure you use the files that are appropriate for the Web server machine. If your Web server is running an operating system other than those listed above, you will need to recompile the source code (located in the source subdirectory) to create an executable for your operating system. Sample make files (abtwsi.mak) are provided in the directories for the supported operating systems.
Setting up the Servlet interface | | | | |
The Servlet interface enables the Web server to run stand-alone executable programs in response to requests from clients. While most Web servers today support servlets, you will need to make sure the specific server you are planning to use supports servlets. A good example is the IBM WebSphere Application Server.
| | | | |
To install the Servlet interface, follow these steps: 1. Copy the Servlet interface Java archive file, abtwsi.jar, to the directory your Web server uses for servlets, usually a servlets subdirectory. (For IBM WebSphere Application Server, install the VisualAge Smalltalk servlets before continuing to set up the Servlet interface.) 2. Run the RouterConfigurationInfoServlet to determine the Web server’s default directory for Java properties files. This servlet is included in the abtwsi.jar file. To run the servlet, point your Web browser to
Note: Many Web Servers set up an alias for the servlets directory, usually named servlet. If the server you are using has an alias, specify the alias instead of the actual servlets directory.
| | | | | | | | |
The RouterConfigurationInfoServlet returns an information page that lists the settings used when the Web Connection Router servlet runs. Under the Basic Properties, record the value for the Default directory property. For example: Default Directory (abtwsi.pro) C:\WINNT\system32\
3. Copy the properties file, abtwsi.pro, to the Default directory that was listed on the information page from the RouterConfigurationInfoServlet. 4. Copy the following files to the directory to be referenced by abtwsi.pro: v abtwsi.cnf (configuration file) v abtwsi.htm (error format file)
| |
If the web server is MS Internet Information Server, use the \Inetpub\wwwroot\cgi-bin directory .
| |
If the web server is IBM HTTP server, then use the \Program Files\IBM Http Server\cgi-bin directory.
8
VisualAge Smalltalk: Web Connection User’s Guide
| | | |
5. Edit the abtwsi.pro file and change the ABTWSI_BASENAME field to point to where the abtwsi.cnf and abtwsi.htm web server interface files reside. For example:
| |
This environment variable specifies where WSI looks for configuration and error message files.
| | | | | |
When you install Web Connection, these files are installed in the webconn directory. You can copy them to another directory and also rename them. If you do either, you must reflect their new location and name in the ABTWSI_BASENAME field in the abtwsi.pro file. For example, if you moved the files to d:\wsifiles, and renamed them from abtwsi.* to mywsi.*, you would supply a value d:/wsifiles/mywsi for the ABTWSI_BASENAME field.
| | | | |
Note: You must use forward slashes (/) when specifying the path information for the ABTWSI_BASENAME field. Java treats backward slashes (/) as escape characters.
| |
ABTWSI_BASENAME=d:/InetPub/wwroot/cgi-bin/abtwsi
6. If you made changes to abtwsi.pro, you may need to stop and restart your Web Server before the changes take effect. 7. Proceed to “Testing your installation” on page 18 to setup, test, and run the Web Connection interface.
Setting up the Server Smalltalk interface The Server Smalltalk interface requires that the Server Workbench feature is installed and loaded into your image. Using Server Smalltalk usually shows better performance when loading your Web Connection part in a browser. There is no setup required to use the Server Smalltalk interface. Proceed to “Testing your installation” on page 18 to test and run the Web Connection interface.
Setting up for CGI The CGI interface enables the Web server to run stand-alone executable programs in response to requests from clients. Most Web servers support CGI, so if you aren’t sure which interface to use, CGI is probably a safe choice. However, its performance is typically slower than that of the other, server-specific interfaces. To install the CGI files, follow these steps: 1. Copy the CGI adapter, abtwsac.exe, to the directory your Web server uses for CGI programs, typically cgi-bin. 2. Copy the following shared library files to a directory on your Web server’s search path: v abtwsc.dll (Common module) v abtwstt.dll (TCP/IP transport module) 3. (Optional) Edit your operating system configuration file and include the ABTWSI_BASENAME environment variable. This environment variable specifies where WSI looks for configuration and error message files. For Intel platforms, use a set statement. For example: set ABTWSI_BASENAME=d:\webserver\cgi-bin\abtwsi
For UNIX platforms, use an export statement. For example Chapter 2. Setting up Web Connection
9
export ABTWSI_BASENAME=/webserver/cgi-bin/abtwsi
4. Copy the following web server interface files to the directory specified by ABTWSI_BASENAME, or to the CGI directory if you have not set ABTWSI_BASENAME:
| | | | |
v abtwsi.cnf (configuration file) v abtwsi.htm (error format file)
| | | | | |
When you install Web Connection, these files are installed in the webconn directory. You can copy them to another directory and also rename them. If you do either, you must reflect their new location and name in the ABTWSI_BASENAME environment variable. For example, if you moved the files to d:\wsifiles, and renamed them from abtwsi.* to mywsi.*, you would supply a value d:\wsifiles\mywsi for the ABTWSI_BASENAME field.
| | |
Note: You must use forward slashes (/) when specifying the path information for the ABTWSI_BASENAME field. Java treats backward slashes (/) as escape characters.
|
5. Enable the CGI directory for web sharing using the properties settings for the directory. You must then use the alias to this directory in your browser URL. After you install the files, you must customize the WSI configuration file for your system. See “Customizing the WSI configuration file” on page 13 for more information. If you are running the Netscape server, you can edit your obj.conf file and change the first Init line to set the environment dynamically for each CGI invocation:
This technique can also be used for setting any other environment variables you need at run time. For example, if you are running under AIX and LIBPATH is not being passed through to the CGI program by the server, you can edit your obj.conf file and set LIBPATH dynamically so that abtwsac can find its shared object files (abtwsc.a, abtwstt.so):
Proceed to “Testing your installation” on page 18 to setup, test and run the Web Connection interface.
Setting up for the IBM Internet Connection API (ICAPI) To install the ICAPI files, follow these steps: 1. Copy the following shared library files to a directory on your Web server’s cgi-bin subdirectory. Make sure your cgi-bin directory is added to your computer’s PATH statement at run time. When adding the directory to your PATH statement, be sure that the exact directory structure is in the PATH variable. Do not use a . to specify the current path. v abtwsai.dll (adapter module) v abtwsc.dll (common module) v abtwstt.dll (TCP/IP transport module) 2. Edit your operating system configuration file and include the ABTWSI_BASENAME environment variable. This environment variable specifies where WSI looks for configuration and error message files. Include the parameter abtwsi at the end of your directory structure. The abtwsi parameter designates the abtwsi.cnf and abtwsi.htm files. For Intel platforms, use a set statement. For example:
|
|
|
10
VisualAge Smalltalk: Web Connection User’s Guide
set ABTWSI_BASENAME=d:\webserver\cgi-bin\abtwsi
For UNIX platforms, use an export statement. For example export ABTWSI_BASENAME=/webserver/cgi-bin/abtwsi
3. Copy the following files to the directory specified by the ABTWSI_BASENAME environment variable. v abtwsi.cnf (configuration file) v abtwsi.htm (error format file) | | | | | | |
When you install Web Connection, these files are installed in the webconn directory. You can copy them to another directory and also rename them. If you do either, you must reflect their new location and name in the ABTWSI_BASENAME environment variable. For example, if you moved the files to d:\wsifiles, and renamed them from abtwsi.* to mywsi.*, you would supply a value d:\wsifiles\mywsi for the ABTWSI_BASENAME environment variable. Note: You must use forward slashes (/) when specifying the path information for the ABTWSI_BASENAME field. Java treats backward slashes (/) as escape characters. 4. Update your Web server configuration. a. Start your Web server b. Open a web browser and point it to your server location (the hostname of the server) c. On the Go Webserver page, select Configuration and Administration Forms d. On the Configuration and Administration Forms page, select GWAPI Application Processing e. On the GWAPI page, for ServerInit, specify the server initialization directive. For example: d:\webserver\cgi-bin\abtwsai.dll:AbtWsiServerInit
f. For ServerTerm, specify the server termination directive. For example: d:\webserver\cgi-bin\abtwsai.dll:AbtWsiServerTerm
g. Apply the changes h. On the Configuration and Administration Forms page, select Request Routing i. On the Request Routing page, select *Service in the Action drop-down list. j. Route all URL requests that start with abtwsi to the dll AbtWsiService: 1) For URL request template, specify /abtwsi*
2) For Replacement file path, specify the service directive. For example: d:\webserver\cgi-bin\abtwsai.dll:AbtWsiService*
k. Apply the changes and restart the Web server. The drive and directory (d:\webserver\cgi-bin in the examples above) should be the directory you copied the WSI executable components to. The Service directive path (/abtwsi/*) can be any path descriptor that you want your end users to use to invoke your Web Connection part. After you install the files, you must customize the WSI configuration file for your system. See “Customizing the WSI configuration file” on page 13 for more information. After customizing the WSI configuration file, proceed to “Testing your installation” on page 18 to setup, test and run the Web Connection interface. Chapter 2. Setting up Web Connection
11
Setting up for Microsoft Internet Server API (ISAPI) To install the ISAPI files, follow these steps: 1. Copy the following shared library files to the directory your Web server uses for CGI programs, typically cgi-bin. Make sure your cgi-bin directory is added to your computer’s PATH statement at run time. When adding the directory to your PATH statement, be sure that the exact directory structure is in the PATH variable. Do not use a . to specify the current path. v abtwsam.dll (ISAPI adapter) v abtwsc.dll (Common module) v abtwstt.dll (TCP/IP transport module)
| | | | | | | | | | | | | | | |
Enable the directory for reading and executing. 2. Edit your operating system configuration file and include the ABTWSI_BASENAME environment variable. This environment variable specifies where WSI looks for configuration and error message files. Include the parameter abtwsi at the end of your directory structure. The abtwsi parameter designates the abtwsi.cnf and abtwsi.htm files. For Intel platforms, use a set statement. For example:
| | | | | |
Note: On Windows NT, in the System Properties window, select the Environment tab. Add a new user variable. The variable name is ABTWSI_BASENAME, and the value is the directory where your WSI configuration files are located. After you update the system variables, you must shut down your computer and start it again. 3. Copy the following files to the directory specified by ABTWSI_BASENAME v abtwsi.cnf (configuration file)
set ABTWSI_BASENAME=d:\webserver\cgi-bin\abtwsi
v abtwsi.htm (error format file) 4. Update your Web server configuration. a. Start your Web server b. Open a web browser and point it to your server location (the hostname of the server) c. On the Microsoft Internet Service Manager, open the Web Server Properties. Select the Directories tab. On the Directories page, do the following: 1) For Directory, specify your Web server path (e.g. d:\webserver\cgi-bin). 2) Specify an alias in the Virtual Directory Alias field. 3) Select the Read and Execute check boxes. 4) Enable directories browsing. d. Apply the changes and restart the Web server. 5. Shut down and restart your computer. If you do not shut down your computer, your operating system may not be able to find necessary files. After you install the files, you must customize the WSI configuration file for your system. See “Customizing the WSI configuration file” on page 13 for more information. After customizing the WSI configuration file, proceed to “Testing your installation” on page 18 to setup, test and run the Web Connection interface.
Setting up for Netscape Server (NSAPI) To install the NSAPI files, follow these steps:
12
VisualAge Smalltalk: Web Connection User’s Guide
| | | | | |
1. Copy the following shared library files to a directory on your Web server’s search path. (If you put them in your cgi-bin directory, make sure this directory is in your search path.) v abtwsan (adapter module) v abtwsc.dll (common module) v abtwstt.dll (TCP/IP transport module)
| | |
Note: On HP-UX only, you can use the Netscape transport module (abtwstn) instead of the TCP/IP transport module. 2. Edit your operating system configuration file and include the ABTWSI_BASENAME environment variable. This environment variable specifies where WSI looks for configuration and error message files. For Intel platforms, use a set statement. For example: set ABTWSI_BASENAME=d:\webserver\cgi-bin\abtwsi
For UNIX platforms, use an export statement. For example export ABTWSI_BASENAME=/webserver/cgi-bin/abtwsi
| | | | | | | | | | | | | | | |
3. Copy the following files to the directory specified by the ABTWSI_BASENAME environment variable. v abtwsi.cnf (configuration file) v abtwsi.htm (error format file) 4. Edit your obj.conf file: v Before any other Init directive, add the following lines: Init fn="init-cgi" Init funcs="AbtWsiServerInit,AbtWsiService,AbtWsiSetPathInfo" fn="load-modules" shlib="d:/cgi-bin/abtwsan.dll" Init fn="AbtWsiServerInit"
v Before the default Object directive, add the following lines: