Chapter 12
Setting Site Preferences

[p]This chapter describes how to set site preferences for Lasso Professional Server. The Setup > Site Settings section in Site Administration allows the Lasso site administrator to set site preferences for the Lasso Professional Server server. These settings cannot be overridden by any lower level security settings or via Lasso. [/p]

Summary

[p]The [code]Summary[/code] page provides an overview of the settings of the Lasso site. The left panel includes information about the version of Lasso, platform, uptime, etc. and a set of quick links to other site LassoApps. The right panel includes a summary of configured data sources, groups, and URL rewrite rules. [/p]

Figure 1: Summary Page

Administrator Settings

[p]The site administrator username and password is established when Lasso Professional Server is installed and initialized. Only the administrator has the privileges to change Lasso’s configuration or security settings, as described in the previous chapter. [/p]

[p]The [code]Administrator Settings[/code] page is where the site administrator username and password can be changed. The site administrator username and password are initially set during initialization as described in the configuration chapters in this guide. The right panel also allows the following settings to be configured. [/p]

Figure 2: Admin Page

Updating the Site Administrator Password

[p]The [code]Administrator Settings[/code] panel allows the administrator username and password to be updated. The password is not shown, but can be changed by entering the current password with a new password and confirmation. [/p]

[note][b]Lost [/b][b]Password Note[/b]: If the site administrator password is lost the server administrator can reset it. See the instructions in the Server Administrator section for more information. [/note]

To change the site administrator username and password:

  1. Enter an administrator username in the [code]Username[/code] field. The username is [code]Administrator[/code] by default.
  1. Enter the current administrator password in the [code]Current Password[/code] field.
  1. Enter a new password in the [code]New Password[/code] field.
  1. Enter the same password exactly as it was entered in the [code]New Password [/code]field in the [code]Confirm New Password[/code] field.
  1. Select the [code]Update Settings [/code]button.
[p]During administrator login, the administrator will be prompted to supply the administrator username and password specified in the [code]Administrator Settings [/code]panel. [/p]

To restart the site:

[p]Select the [code]Restart Site[/code] button. It can take up to a minute for the site to restart. No other sites in Lasso Service will be affected. [/p]

Lasso Settings

[p]The [code]Lasso Settings[/code] page in Site Administration allows the administrator to control how Lasso Professional Server processes certain types of Lasso syntax, and how it handles cases where certain types of code can adversely affect Lasso Service. [/p]

Figure 3: Lasso Settings Page

Syntax Settings

[p]The [code]Syntax Settings[/code] panel allows Classic Lasso syntax to be globally enabled or disabled, and also allows the Lasso Professional default error page to be configured. [/p]

  1. [note][b]Note: [/b]Errors and error codes are further discussed in the Error Control chapter of the Lasso 8.5 Language Guide. A list of error messages and code numbers can be found in Appendix B: Error Codes of the Lasso 8.5 Language Guide. [/note]

Default Page Encoding

[p]The [code]Default Page Encoding[/code] panel allows the administrator to specify the default character set that Lasso Service should assume when interpreting data sent via client browsers (such as HTML form data). This can be UTF-8 (Unicode) or Latin-1 (ISO-8859-1). Unicode is used by default. [/p]

To set the default character set:

  1. Select [code]UTF-8 (Unicode)[/code] or [code]Latin-1 (ISO-8859-1)[/code] from the [code]Encoding[/code] pull-down menu.
  1. Select the [code]Update[/code] button.

Recursion Settings

[p]The [code]Recursion Limit[/code] panel allows the administrator to set a limit as to how many times a Lasso page may call itself using an[code] [Include][/code] or [code][Library] [/code]tag. A recursion limit will eliminate cases where a page has been programmed to recurse infinitely, and would otherwise adversely affect the operation of Lasso Service. [/p]

To set a recursion limit:

  1. Select [code]Yes[/code] from the [code]Limit Recursion[/code] pull-down menu (default). Selecting [code]No[/code] removes the recursion limit, which is not recommended.
  1. Enter the number of times (positive integer) you want to allow a page to recurse before being stopped in the [code]Recursion Threshold [/code]field (50 by default).
  1. Select the [code]Update[/code] button.

Execution Time Settings

[p]The [code]Lasso page Execution Time[/code] panel allows the administrator to set a time limit as to how many seconds a Lasso page (Lasso page) may run before timing out. A Lasso page execution time limit can help eliminate cases where a page has been programmed to perform endless operations that may otherwise adversely affect the operation of Lasso Service. [/p]

[note][b]Important: [/b]The Lasso page execution time limit controls the amount of time Lasso waits before timing out a true Lasso operation. This does not include nor factor in any timeout thresholds present in third-party components, such as data sources, Web servers, and Web browsers. [/note]

To set a Lasso page execution time limit:

  1. Select [code]Yes[/code] or [code]No[/code] from the [code]Limit Execution Time[/code] pull-down menu to enable or disable page timeouts for the entire server ([code]Yes[/code] by default).
  1. Enter the number of seconds (positive integer) you want to allow a page to run before being timed out ([code]600 [/code]by default). The format value time limit can not be set to a value below [code]60[/code] (one minute).
  1. Select [code]Yes[/code] or [code]No[/code] from the [code]Allow User Override[/code] pull-down menu to enable or disable developers’ abilities to set custom timeouts for individual pages using the [code][Lasso_ExecutionTimeLimit] [/code]tag ([code]Yes[/code] by default).
  1. Select the [code]Update[/code] button.
Domain Name Lookups

[p]This panel allows a default DNS server to be configured for this Lasso site. Lasso will normally use the system default DNS server. However, Lasso’s TCP-based DNS tags are not compatible with DNS servers found in some DSL or cable modem routers which only support UDP. If Lasso returns an error when using the DNS tags then a different DNS server can be tested and configured here. [/p]

To set Lasso’s default DNS server:

  1. Enter a custom DNS server host name or IP address and select [code]Test[/code]. Lasso will report on whether the DNS server can be accessed or not.
  1. Select [code]Update[/code] to accept the configured DNS server..

File Extension Settings

[p]The [code]File Extensions[/code] section in Site Administration allows the administrator to control what file extensions are allowed for use with Lasso. The [code]Lasso Page Settings[/code] panel includes the extensions that can be used for Lasso pages in Lasso Professional Server. The [code]File Tags Settings[/code] panel includes the extensions that can be used with the file tags, image tags, pdf tags, etc. [/p]

Figure 4: File Extensions Page

[p]Adding a file extension to this page does not cause the files with that extension to be processed by Lasso, but rather grants permission for the use of files with that extension within Lasso. The difference between Lasso page settings in Site Administration and Lasso page settings in the Web server is described below. [/p]

To add a Lasso page extension in Site Administration:

  1. Enter the extension to be allowed in the [code]Add Extension[/code] field. If the file extension is for a Lasso page that should be processed by Lasso it needs to be entered in the [code]Lasso page Settings[/code] panel. If the file extension is for a data file that will be manipulated by Lasso it needs to be entered in the [code]File Tags Settings[/code] panel. All extensions must be preceded by a period ([code].[/code]).
  1. Select the [code]Add Extension [/code]button.

To remove a Lasso page extension in Site Administration:

[p]Select the [code]Minus (-)[/code] button next to the extension to be removed. [/p]

[note][b]Note: [/b]The [code].Lasso[/code], [code].LassoApp[/code], and[code] .uld [/code]extensions cannot be removed as they are required for the basic operation of Lasso. The [code].uld [/code]extension is used by Lasso to temporarily identify files uploaded via the Web, and is necessary if files will be uploaded via a Web interface. [/note]

Session Settings

[p]The [code]Sessions[/code] page allows the administrator to set site preferences for the [code][Sessions_…][/code] tags in Lasso Professional Server, including establishing where all session data for the site is stored. [/p]

Figure 5: Sessions Page

Session Tag Preferences

[p]The Session Tag panel allows the administrator to set site preferences for the [code][Sessions_…][/code] tags. These preferences govern how sessions will propagate through HTML pages, and are described below. For information on the [code][Session_…][/code] tags, see the Sessions chapter in the Lasso 8.5 Language Guide. [/p]

Modify Tags/Attributes

[p]The [code]Modify Tags/Attributes[/code] field allows the administrator to specify what HTML tags and attributes the [code][Session_…][/code] tags will append token values to. When using sessions, these token values allow variables for a user to stay consistent from page to page. All HTML tag and attributes involved in linking a user from one page to another should be listed here. When invoked, session URL data will be added to the attributes of the tags specified, which should be set to valid paths to files. The [code]action[/code] attribute of the [code]<form>[/code] tag and the [code]href [/code]attribute of the[code] <a>[/code] tag are listed by default. [/p]

[p]To add a new tag/attribute pair: [/p]

  1. Next to [code]Add Tag/Attribute[/code], enter the name of an HTML tag in the left-most field. The [code]<[/code] and [code]>[/code] HTML characters should not be included as part of the tag or attribute names.
  1. Next to [code]Add Tag/Attribute[/code], enter the name of the attribute of the tag to which session data will be appended in the right-most field.
  1. Select the[code] Add Tag/Attribute [/code]button.

To remove an existing tag/attribute pair:

[p]Next to [code]Modify Tag/Attributes[/code], select the [code]Minus (-)[/code] button next to the tag/attribute pair you wish to delete. [/p]

Avoid Prefixes

[p]The[code] Avoid Prefixes[/code] field allows the administrator to specify URL prefixes that should be avoided by the[code] [Session_…][/code] tags, meaning that no session information will be appended to links with the specified prefixes. Because session data may only be interpreted by Lasso pages, any prefix that takes a user to a page on a different server or initiates a protocol that cannot be parsed by Lasso (e.g. [code]telnet://[/code], [code]file://[/code], [code]mailto:[/code]) should be listed here. [/p]

To add a prefix to be avoided:

  1. Enter the URL prefix to be avoided in the [code]Add Prefix[/code] field. Any URLs that begin with the value entered here will be avoided.
  1. Select the [code]Add Prefix[/code] button.

To remove a prefix:

[p]Next to [code]Avoid Prefixes[/code], select the [code]Minus (-)[/code] button next to the prefix you wish to remove. [/p]

Memory Sessions

[p]Lasso Professional Server provides a new in-memory session driver which allows sessions to be served very fast. When the memory session driver is selected sessions will only persist until Lasso Service is restarted. [/p]

Multi-Server Session Support

[p]Lasso Professional Server provides the ability to share session data with other Lasso Professional Server servers so that Lasso sessions can persist within load-balancing and redundant server configurations with multiple Lasso Professional Server servers. [/p]

[p]Session sharing is achieved by designating a single external MySQL host to serve all Lasso session data, and then configuring each Lasso Professional Server server to store all session data on this host. [/p]

[p]For best performance, the session tuning parameters described below should be used to establish one Lasso server as the master of the session table which will perform routine maintenance. Each of the other Lasso servers that are sharing the same MySQL table should be set to never delete expired sessions. [/p]

[p]If multiple Lasso 8.5 (8.1 or higher) servers are sharing the same MySQL data source then the MySQL compatibility option in the session tuning parameters should be set to [code]Lasso 8.1[/code]. This provides the best performance. If Lasso 7 and Lasso 8 servers are sharing the same MySQL data source then the MySQL Compatibility option should be set to [code]Lasso 7/8[/code]. Se the section on session tuning parameters below for more information. [/p]

[note][b]Warning: [/b]Configuring Lasso to store all session data on an external MySQL host creates a dependency on that external host in order for sessions to work. It is strongly recommended that the MySQL server be on the same network as the Lasso Professional Server servers. [/note]

Configuring an External Session Host

[p]The [code]Session Data Server[/code] panel allows the administrator to set the MySQL host that will be used to store all session data for the current Lasso Professional Server server. [/p]

To create and use an external sessions table:

To select and use an existing external sessions table:

Session Tuning

[p]The session tuning preferences are advanced options that allow the behavior of the session manager to be modified for best performance in a variety of different server configurations. [/p]

  1. [note][b]Note: [/b][code][Session_DeleteExpired][/code] can also be used in a scheduled event to delete sessions on a custom schedule. [/note]

Java Settings

[p]The [code]Java[/code] page is where the administrator can set up Lasso Professional to work with Java, so that Lasso’s Java-based components may be used. This includes JDBC data source connectivity, third-party LJAPI modules, and Lasso tags which have Java-based implementations. Consult the Lasso 8 Reference for information on whether or not an Lasso tag requires Java. [/p]

[p]The [code]Java Settings[/code] panel allows the administrator to globally enable or disable Java-based components, and to set the [code]Class Path[/code] and [code]Library Path[/code] for third-party Java module class files. The [code]Class Path[/code] and [code]Library Path [/code]for all default Java modules installed with Lasso Professional Server is the [code]Lasso Professional Server/LassoModules[/code] folder, which cannot be changed. Altering the [code]Class Path[/code] and [code]Library Path[/code] fields in the [code]Java Settings[/code] panel will not affect how the default Java modules operate. [/p]

Figure 6: Java Page

[p]LJAPI allows Java programmers to develop new tags and functionality in Lasso Professional Server. For more information on LJAPI, see the Lasso Java API chapter in the Lasso 8.5 Language Guide. [/p]

To update Java settings:

  1. Select [code]Enabled [/code]or [code]Disabled[/code] from the [code]LJAPI Modules [/code]pull-down menu to enable or disable LJAPI ([code]Disabled[/code] by default). This includes all core Java functionality in Lasso Professional Server as well as third-party LJAPI modules.
  1. Enter the file path to the Java class folder in the [code]Class Path[/code] field.
  2. [note][b]Note: [/b]Multiple[code] Class Paths[/code] or [code]Library Paths[/code] can be specified by entering a semi-colon [code];[/code] (Windows) or colon [code]:[/code] (Mac OS X) after a path, and then entering the next full path immediately after the semi-colon or colon. There should be no spaces or carriage returns in or between any specified path(s) per JRE syntax requirements. [/note]
  1. Enter the file path to the Java library folder in the[code] Library Path[/code] field.
  2. [note][b]Windows [/b][b]Note[/b]: The default[code] Class Path[/code] and [code]Library Path[/code] may not be correct depending on the version of JRE installed. It is necessary to confirm the actual path to the [code]lib[/code] folder in Windows before selecting[code] Update[/code]. [/note]
  3. [note][b]Mac [/b][b]OS X Note[/b]: The [code]Class Path[/code] and [code]Library Path[/code] fields are unnecessary for Mac OS X installations, and are blank by default. [/note]
  1. Select [code]Update[/code]. A dialog box will appear informing one to double-check the [code]Class Path[/code] and [code]Library Path[/code] in the hard drive to ensure they are correct, and to restart Lasso Service after selecting [code]OK[/code].
  1. Select [code]OK[/code].
  1. Restart Lasso Service for the changes to take effect.
  1. Return to the Setup > Site > Java page in Site Administration.
  1. Select the [code]Test[/code] button.
[p]If the [code]Activated[/code] field now displays [code]Yes[/code], then LJAPI has been successfully enabled. Otherwise, an error will be displayed informing you to double-check the [code]Class Path[/code] and [code]Library Path[/code] fields against the actual file path to the[code] lib[/code] folder on the hard drive, and to make sure that Java has been installed properly. For instruction on properly installing Java, see the configuration chapters in this guide. [/p]

[p]LJAPI is checked to ensure it is operational via an internal check for an LJAPI-based tag (e.g. [code][NS_Lookup][/code]). If this tag is functioning as expected, Lasso will then change the value in the [code]Activated[/code] field to [code]Yes[/code]. [/p]

Import and Export Settings

[p]The[code] Import/Export[/code] page in Site Administration provides the ability to export the complete state of Lasso’s configuration and security settings. Importing and exporting setup files is useful for backing up a particular Lasso Professional Server configuration, or setting up a new installation with the same configuration as another copy of Lasso Professional Server. [/p]

[p]A Lasso setup file is an text file that contain all custom administration settings entered in Site Administration. The information in a Lasso setup file corresponds to the options selected in Site Administration in the [code]Site Settings[/code], [code]Data Sources[/code], and [code]Security[/code] pages. [/p]

[p]Care should be taken with the setup files that are exported, as these files contains all of the security settings of Lasso Professional Server. Lasso stores passwords for data sources and users in plain text. Export files which have been modified by an untrusted third-party should never be imported into Site Administration without careful review of the settings within the file. [/p]

Figure 7: Import/Export Page

Exporting Lasso Setup Files

[p]The [code]Export Setup[/code] panel allows the current Lasso Professional Server configuration to be exported as a text setup file to be preserved for future use. [/p]

To export a Lasso setup:

  1. In the [code]Export Setup[/code] panel, select the [code]Export Setup[/code] button. This will automatically download a file that contains the contents your Lasso Professional Server setup file named [code]Export_YYYYMMDDHHMMSS.txt[/code].

Importing Lasso Setups

[p]The [code]Import Setup[/code] panel allows Lasso setup files to be imported. Only setup files exported using Lasso Professional Server may be imported. [/p]

[p]To import a Lasso setup: [/p]

  1. In the [code]Import Setup[/code] panel, select the [code]Browse[/code] button, and choose the Lasso setup file on your hard drive you wish to import.
  1. Select the [code]Import Setup[/code] button. A warning informs the administrator that importing a setup will overwrite all existing installation settings with the settings being imported.
  1. Select the [code]OK[/code] button. This will overwrite all current settings with those stored in the imported setup file.
  1. After the import has been performed the current site is automatically stopped. Follow the [code]Site Administration[/code] link to trigger the site to restart. You may get an error when you first click the link. Wait 10-15 seconds and try the link again.
[note][b]Note: [/b]The site administrator username and password will not be overwritten.[/note]