Client Environment

Requires Platform 4.2+

Specifying Minimum Client Environment

In Nexaweb 4.2.x and later, you can specify the minimum browser environment criteria required for your Nexaweb client application to launch.

For example, if your Nexaweb-enabled application requires JVM 1.2 or later, you can configure launch requirements that detect early into the application launch cycle whether the client environment meets the system minimum requirements of this application and then alert the user, by displaying an error page, if their client environment does not.

You specify this information in the new <launch-requirements> section of the Nexaweb client configuration file, nexaweb-client.xml.

You can configure <launch-requirements> that specify whether to allow or prevent the following in the browser environment:

  • Versions of Java Virtual Machine (JVM)
  • JVM vendors
  • user-agents (for rendering web content such as media players, plug-ins, and so forth) 

In addition, you can specify:

  • Minimum screen resolution
  • Error page to display if browser does not meet minimum requirements

Including or Excluding Browser Requirements

To include or exclude browser requirements, you use the:

  • <include>*</include>
  • <exclude>*</exclude>

tags in <launch-requirements> section entries.

Use the * (star) to match all. You cannot use it as a wildcard for pattern matching.

You can specify what to include or exclude as follows:

  • <include>*</include>  -  include anything
  • <include>1.5.*</include>  -  include any 1.5 version
  • <include>*</include>
    <exclude>1.3.*</exclude>  -  include all versions except 1.3
  • <include> 1.4 </include> includes all 1.4.X versions (for example, 1.4.0_10, 1.4.1_05, 1.4.2_02, , and so forth)
  • <include> 1.4.2 </include>  includes all micro versions (for example, 1.4.2_01, 1.4.2_02, and so forth)
  • <include>1.4.2_08 </include> includes all builds (for example, 1.4.2_0211, 1.4.2_0289, and so forth)

Adding Launch Requirements to the Nexaweb Client Configuration File

To add launch requirements to the Nexaweb client configuration file, nexaweb-client.xml, follow these steps:

  1. Locate the nexaweb-client.xml file in your application's WebContent\WEB-INF directory.
     
  2. Open it with a text editor.
     
  3. Look for the <launch-requirements> section, similar to the following:

    <launch-requirements>
       <jvm-version>
          <include>*</include> 
          <exclude></exclude>
       </jvm-version> 
       <jvm-vendor>
          <include>*</include>
          <exclude></exclude> 
       </jvm-vendor>
       <user-agent>
          <include>*</include>
          <exclude></exclude>
       </user-agent> 
       <minimum-screen-resolution>
          <width>0</width>
          <height>0</height>
       </minimum-screen-resolution>
       <error-page>Nexaweb/jsp/launcher/errorLaunchRequirementsNotMet.jsp</error-page>
    </launch-requirements>
  4. Specify the JVM version that your application's client requires in the <jvm-version> section's <include>*</include> and <exclude>*</exclude> tags.
    The client displays an error if a browser attempting to launch it uses a version of JVM not in the jvm-version include list, or in the exclude list. You can specify multiple include and exclude tags. 
    The following example creates launch requirements for an application's client to run with any 1.4 JVM except 1.4.0 and also with 1.3.2_02:

    <include>1.4</include>
    <include>1.3.2_02</include>
    <exclude>1.4.0</exclude> 
  5. Specify the JVM vendor that your application's client requires in the <jvm-vendor> section's <include>*</include> and <exclude>*</exclude> tags.
    Your application's client checks the string in the include or exclude against the java.vendor property. For example, sun would match against the Sun plug-in which reports "Sun Microsystems" as the java.vendor. The client displays an error if a browser attempting to launch it uses a JVM by a vendor not in the JVM-vendor include list, or in the exclude list. You can specify multiple include and exclude tags.
     
  6. Specify any user-agent that your application's client requires in the <user-agent> section's <include>*</include> and <exclude>*</exclude> tags.
    The client displays an error if a browser attempting to launch it uses a user-agent not in the user-agent include list, or in the exclude list. You can specify multiple include and exclude tags.
     
  7. Specify the minimum screen resolution that your application's client requires in the <minimum-screen-resolution> section's <width>0</width> and <height>0</height> tags. The client displays an error if a browser attempting to launch it uses a screen resolution below the resolution specified here.
     
  8. If you do not want to use the default error pages that the user can access from the error message that appears if the user's browser does not meet the launch requirements, specify the error page to use in the <error-page> </error-page> section. The default error page, like other Nexaweb error pages, receives client information as parameters in the URL string. The exception parameter indicates the reason the client did not meet launch requirements. It contains one of the following values, indicating the reason that the application failed to launch:
    - jvm-version-not-included
    - jvm-version-excluded
    - jvm-vendor-not-included
    - jvm-vendor-excluded
    - user-agent-not-included
    - user-agent-excluded
    - minimum-screen-resolution-width
    - minimum-screen-resolution-height
  9. When you finish adding launch requirements, save and close the nexaweb-client.xml file.