XSPUrl (XSPUrl - JavaScript)

Creates an XSPUrl object.

Defined in

XSPUrl (JavaScript)

Syntax

XSPUrl(url:string)
Parameters Description
url A URL.

Usage

For the parameter, you can specify an empty string or partial URL, then use the "set" methods to define the URL.

Example

This example creates a new XSPUrl object.
function p(stuff) {
	print("<<<" + stuff + ">>>");
}

var url : XSPUrl;

try {
	url = new XSPUrl("");
	url.setScheme("http");
	url.setHost("myhost.ibm.com");
	url.setPort(10038);
	url.setPath("/wps/PA_cow3tik/page1.xsp");
	p(url.toString());

} catch(e) {
	p("Error = " + e);
}

Print output from the example is as follows:

<<<http://myhost.ibm.com:10038/wps/PA_cow3tik/page1.xsp>>>