getPath (XSPUrl - JavaScript)

Gets the path of the URL.

Defined in

XSPUrl (JavaScript)

Syntax

getPath() : string
Return value Description
string The path.

Example

This example gets the path of the URL for the current context.
function p(stuff) {
	print("<<<" + stuff + ">>>");
}

var url : XSPUrl;

try {
	url = context.getUrl();
	p("getPath = " + url.getPath());

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

Print output from the example might be as follows:

<<<getPath = /wps/PA_cow3tik/page1.xsp>>>