setPath (XSPUrl - JavaScript™)
Sets the path of the URL.
Defined in
XSPUrl (JavaScript)Syntax
setPath(path:string) : void
Parameters | Description |
---|---|
path |
The new path. |
Example
This example sets the path for a newXSPUrl
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>>>