6.1 URL Syntax

The syntax of a URL used to execute a Visual LANSA web page has the format:

http://[domain]:[port]/[configuration]/[partition]/[webpage].html

or

http://[domain]:[port]/[configuration]/[partition]/[webpage].html?[parameter]=[value]

Parameters are optionally appended to the URL following a '?' to nominate a specific language or to facilitate options which are useful during development of your web application.

When you execute a Web Page from the IDE the generated URL will be like this:

http://localhost:2044/lansa14/dem/ xvlwebtst.html?lang=eng&developer=yes

If you the run the same Web Page on an IBM i web server, you will notice a slightly different URL that is something like this:

http://myibm:1010/dc-pgmlib/dem/ xvlwebtst.html?lang=eng&developer=yes

Deciphering the URL

[domain]:[port]

localhost:2044
or
myibmi:1010

The URL always starts with the domain and a qualifying port number. If you are running from your local pc, localhost, and want to share this URL with someone else on your network substitute localhost for your pc name. You only need to qualify the port number if you are not using the default port 80.

[configuration]

lansa14
or
dc-pgmlib

On windows this is your current configuration name. On IBM i it will be the program library associated with your LANSA installation.

[partition]

dem

The partition you are executing from.

[webpage].html

xvlwebtst.html

The html page you are executing, that is the identifier of the web page with a .html suffix.

[parameter]=[value]

 

After the ? in the URL you can add various parameters and values to influence how your Web Page is executed.

 

lang=eng

A three-character language parameter, for example, eng for English. If the language is not specified, the default language is used.

 

developer=yes

To ensure the latest version of the generated JavaScript files are used, the developer parameter is automatically added to the URL when executed from the development environment.

DO NOT USE Developer=Yes on production sites. This is a development feature only and, if used, may lead to significant performance issues.

 

debug=yes, katew10:51234

If you run your Web Page from the development environment in debug mode the debug settings will be automatically appending to the URL including <computer name>:<debug port>.

You can view these settings in LANSA Settings > Options > Debug.

 

Custom parameters can be added to the URL

Naming Conventions for URLs

Only the characters Aa-Zz and 0-9 are valid for URLs. All other characters are replaced with a '-' (hyphen/minus), for example dc@pgmlib would be replaced by dc-pgmlib in a URL. These restrictions are enforced to avoid language based complications.

URLs should always be constructed as lowercase. All generated files are created as lower case. As IBM i file names are case sensitive, using the wrong case will result in a runtime failure in this environment.