Internet Technologies:waa

The entry point Professional

The best thing to start with when developing a new Web application is to design the start-up HTML page that serves as the entry point into your package DLL. Remember, the PRG code will be linked to a DLL that is loaded dynamically by the WAA server. There is no Main procedure in your PRG code and nothing will be executed automatically when the package DLL is loaded, except for the _Register() function which tells the WAA server the form-functions available in the DLL (refer to the discussion in the chapter My first Web applicationfor details).

The start-up HTML page must be located in the document root directory of the HTTP server. This is required because the page is accessed by a Web browser via an URL address. The HTTP server returns the start-up page which must contain at least the following five lines of HTML code to enable the Web browser to call functions inside a package DLL:

<FORM ACTION="/cgi-bin/waa1gate.exe" METHOD=post> 
  <INPUT TYPE=hidden NAME="WAA_PACKAGE" VALUE="My_Dll"> 
  <INPUT TYPE=hidden NAME="WAA_FORM"    VALUE="My_Function"> 
  <INPUT TYPE=submit VALUE="Caption"> 
</FORM> 

These lines define the name of the gateway, the package DLL, the form-function to invoke and a submit button. When a user clicks this button, the names are sent to the WAA server which invokes the corresponding function in your Web application ( The name of the gateway is "waa1gate.isa" when MS Internet Information Server is used as HTTP server).

If the form contains one or more html input tags of the type file and the file contents shall be uploaded to the server then it is also required to specify the form encoding as "multipart/form-data". If this is omitted then only the name of the file is transferred to the WAA server.

<FORM ACTION="/cgi-bin/waa1gate.exe" METHOD=post 
      ENCTYPE="multipart/form-data"> 
  <INPUT TYPE=hidden NAME="WAA_PACKAGE" VALUE="My_Dll"> 
  <INPUT TYPE=hidden NAME="WAA_FORM"    VALUE="My_Function"> 
  <INPUT TYPE=file   NAME="File1"> 
  <INPUT TYPE=submit VALUE="Caption"> 
</FORM> 

Feedback

If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.