Specifying Your HTML Thin Client Access Options

An example of the Web Options sheet of the Define Application dialog is shown in the following image.

For more details about the Define Application dialog, see "Defining Applications", in Chapter 3 of the JADE Development Environment User’s Guide. For details about defining a Web services application, see "Defining a Web Services Provider Application", in Chapter 11 of the JADE Developer's Reference. For details about defining a REST services application, see "Defining a REST Service Application", in Chapter 11 of the JADE Developer's Reference.

To specify your HTML thin client options

  1. In the Connection Name text box, specify the appropriate TCP/IP address in the format TCP-address:port-number (for example, 143.67.78.90:6014).

    If you want to get the IP address, call the WebSession class getServerVariable method to return the IP address of the current Web session as determined by the Web server, as follows.

    currentSession.getServerVariable('REMOTE_ADDR');

    For details about using the ConnectionName parameter in the [WebOptions] section of the JADE initialization file, see your JADE Initialization File Reference.

    The connection name defaults to the application name. (The application name is displayed in the title bar of the Web Application Monitor window.) If you have more than one application with the same name, specify a unique name to identify the connection. The connection name can include any character or number in the ranges A through Z, a through z, or 0 through 9. The first character must be uppercase.

  2. In the Application Copies text box, specify the maximum number of copies that you require for your HTML thin client application. When the HTML thin client application starts, the number of copies specified in this text box are started. The default value is 1. You can specify a maximum of 62 copies, which is a Windows‑imposed limit.

    All application copies use the same port number. If you specify 6014 as the starting port number in the Connection Name text box and specify three in the Application Copies text box, the application copies use port numbers 6014, 6015, and 6016.

    For details about using the ApplicationCopies parameter in the [WebOptions] section of the JADE initialization file to specify or change the number of copies of the application to start up, see your JADE Initialization File Reference.

  3. In the Session Timeout text box, specify the period in minutes at which the Web session is to end if no requests have been received within that time. The default value of zero (0) indicates infinity; that is, you do not want your Web session to time out.

    The Application class getSessionTimeout and setSessionTimeout methods enable you to get and dynamically set the current Web session timeout value, respectively.

  4. In the Minimum Response Time text box, specify the maximum time (in seconds) that a Web browser user has to wait before a response must be sent back to that user from the JADE application, triggered by a timer event.

    By default, requests do not time out; that is, the default value of zero (0) indicates infinity.

    When the timer event occurs, a default message is sent back to the browser and the current request is terminated. You can override the default message that is sent to the browser user by reimplementing the Application class minimumResponseTimeExceededMsg method in the Application subclass of your user‑defined schema.

    You can also set the minimum response time value dynamically at run time, by setting the Application subclass webMinimumResponseTime property in your logic.

  5. Check the Disable Messages check box to specify that your Web session messages are not displayed in a message box on your client workstation; for example, in a confirmation dialog when the Web session is shut down.

    By default, message boxes are enabled; that is, this check box is unchecked. Regardless of the setting of this parameter, any message that is raised is displayed in the Web Application Monitor window.

  6. If you selected the HTML Documents option button on the Application sheet of the Define Application dialog (that is, you want HTML generated based on HTML documents in your Web application), the HTML Documents sheet on the Web Options sheet is enabled. (For details about the Applications sheet, see "Defining Applications", in Chapter 3 of your JADE Development Environment User’s Guide.)

    Perform the following actions to define your HTML document requirements.

    1. In the Machine Name text box, specify the physical location to be used when generating the HTML for the JadeHTMLClass class buildFormActionOnly and buildLink methods.

    2. In the Virtual Directory text box, specify the Uniform Resource Location (URL) to be used when generating the HTML for the JadeHTMLClass class buildFormActionOnly and buildLink methods.

      For details about using the URLSpecifications parameter in the [WebOptions] section of the JADE initialization file to specify Internet server virtual directories for HTML documents for all of your Web‑enabled applications or for a specific Web-enabled application, see the JADE Initialization File Reference.

    3. Use the Home Page combo box to select the HTML home page that is to be the start-up page when you run your Web-enabled application. (If you do not select a home page, an error is displayed when you click the OK button on the Define Application dialog.)

    See also "Adding and Maintaining HTML Documents", in Chapter 12 of the JADE Development Environment User’s Guide.

  7. If your Web application uses JADE forms from which you want HTML dynamically generated and you did not change the default value of JADE Forms in the Web Application Type group box on the Application sheet of the Define Application dialog, specify your Web application form options on the JADE Forms sheet.

    The JADE Forms sheet is enabled only when your application does not use HTML documents; that is, you selected the form that is to be displayed when the new application is started in the Start-up Form combo box on the Application sheet of the Define Application dialog and you did not change the default Web application type of JADE Forms.

    Perform the following actions to define your JADE form requirements.

    1. In the Virtual Directory text box, specify the Uniform Resource Location (URL) if you want your images and Java applets located in a directory other than the working directory of the JADE application. There is no default base URL. If you do not specify a URL in this text box, the virtual directory specified in the Microsoft IIS is used as the URL.

      When setting up IIS for JADE, you must specify a virtual directory and the physical location of this directory. By default, the virtual directory is used as a work area for generating image files.

      If the Base URL is set up, the generated HTML code uses this URL to set up locations for these files, rather than the default work area.

      To enable JADE to determine the physical location of this base URL, you must also specify the physical directory in the Physical Directory text box. To create the physical directory, click the Create button. In IIS, this physical directory must be set up as a virtual directory, by using the base URL that you specify in this text box.

      The VirtualDirectory parameter in the JADE initialization file [WebOptions] section enables you to specify a location for your images and Java applets other than the working directory specified in this text box, if required. (For details, see "Web Options Section [WebOptions]", in the JADE Initialization File Reference.)

      For details about using the URLSpecifications parameter in the [WebOptions] section of the JADE initialization file to specify Internet server virtual directories for HTML documents for all of your Web‑enabled applications or for a specific Web-enabled application, see the JADE Initialization File Reference.

    2. In the Physical Directory text box, specify the name of the physical working directory for your HTML‑enabled application; for example, s:\jade\webtest\bin. The working-directory is usually the directory in which the JADE executable file (jade.exe) is located but you can specify another working directory when you install JADE, if required. This is used by JADE to generate images for the Web.

      The PhysicalDirectory parameter in the JADE initialization file [WebOptions] section enables you to specify a physical directory to override the working directory specified in this text box, if required. You can specify multiple physical directories in the same JADE initialization file. For details, see "Web Options Section [WebOptions]", in the JADE Initialization File Reference.

      This parameter, which is used to generate images for the Web, applies only to Web-enabled (that is, HTML-enabled) applications and not to Web services or REST services applications.

    3. In the Maximum HTML Size text box, specify the maximum size in K bytes of the HTML string that can be generated before stopping the generation. Although you can specify 99,999K bytes as the size of the maximum HTML string, this would have a considerable impact on performance.

      The optimum HTML string size is dependent on the available memory of both your Internet and your JADE server. 30K bytes is a recommended maximum string size.

      If the specified maximum HTML string is generated, the HTML generation is then stopped and the partially generated string is returned to the Internet browser with the following message appended to the string.

      Exceeded maximum lines

      The default value of zero (0) specifies that there is no maximum HTML size.

    4. In the Scrolling Text text box, specify the text that you want to scroll across the bottom of your Web page, if required. By default, no text is scrolled across a Web page.

    5. Check the Treat showModal as show check box to display Web pages in the application by using the show method if the showModal method is encountered in your code. (The show method executes the load method, generates the HTML, and then returns the HTML to the Web server.)

      As the showModal method is not supported, by default, an error is raised at run time if the showModal method is encountered.

    6. Check the Cross Browser Compatibility check box to specify the version of HTML code that JADE generates for your Web sessions. Check this box if you want compatibility across browsers for your JADE Web sessions; that is, identical HTML code is generated for both Netscape and Internet Explorer.

      By default, different HTML code is generated for Internet Explorer 4.0 (that is, this check box is unchecked).

    7. Check the Form Style Display (IE 4) check box to specify that your Web pages are displayed as windows (that is, with captions and borders) when using Internet Explorer 4.0. By default, your JADE forms are displayed as Web browser pages (that is, this check box is unchecked).

    8. Click the Web Events button on the JADE Forms sheet if you want to specify the handling of:

      • The click event method in check box, combo box, list box, table, and option button controls on Web pages, and in your user-defined subclasses of those five controls types only.

      • The sheetChg event method in folder controls and your user-defined folder control subclasses.

      Events are supported on Web pages only when using Microsoft Internet Explorer 4.0 or higher.

      The Web Events dialog is then displayed. For details, see "Enabling Event Handling on Web Pages", later in this chapter.

  8. Click the OK button. Alternatively, click the Cancel button to abandon your selections.

For details about implementing a TCP/IP connection to your JADE applications, see "Connecting to JADE Applications from Internet Information Server (IIS)", in Chapter 2 of the JADE Installation and Configuration Guide.

If you want to restrict the number of Web-enabled, Web services, or REST services applications, you can set the LimitPortRange parameter in the [WebOptions] section of the JADE initialization file to true. This prevents applications from using a port number that exceeds the starting port number plus the number of copies of the application. When you set this parameter to true, an application cannot be started when the port limit is exceeded, and a message is output to the jommsg.log file.

If you want to change the number of seconds after which Web-enabled, Web services, or REST services applications wait for message transfers to complete before timing out, specify the ReadTimeout parameter in the [WebOptions] section of the JADE initialization file with the appropriate number of seconds. The default value is 600 seconds (10 minutes) but you can specify this parameter and set it to zero (0) if you do not want the application to time out waiting for message transfers to complete. (You can prefix this parameter with the name of the application if you want different applications to have different message transfer timeout values.)