Can I get JSM's port number like "document.location.host"
Posted: 25 Jul 2017, 20:31
Hello,
I really need to know how to get the port number of JSM server which a session runs in order that making it easier to manage several JSM servers.
For example:
I use the script shown below.
--------------------------------------------------------------------
var ip = document.location.host.split(":")[0];
var id = FIELDS("G1001").getValue().trim();
if ( id === "" || id === null ){
alert("Enter the Product Code Please.");
}else{
var config =
{
serverUrl: "http://" + ip + ":5563/service/longreach.jsp",
credential: {user:"lansa", password:"lansa"}
};
LONGRANGE.FileTransfer.setDefaultConfig(config);
.......
--------------------------------------------------------------------
In this case, the port number "5563" in the above code has to be changed whenever it is changed in httpd.xml.
If the port number in the code becomes a variable, it would be much better.
Does anyone know that?
Thanks for your help.
Best Regards,
Hidekazu Tanaka
I really need to know how to get the port number of JSM server which a session runs in order that making it easier to manage several JSM servers.
For example:
I use the script shown below.
--------------------------------------------------------------------
var ip = document.location.host.split(":")[0];
var id = FIELDS("G1001").getValue().trim();
if ( id === "" || id === null ){
alert("Enter the Product Code Please.");
}else{
var config =
{
serverUrl: "http://" + ip + ":5563/service/longreach.jsp",
credential: {user:"lansa", password:"lansa"}
};
LONGRANGE.FileTransfer.setDefaultConfig(config);
.......
--------------------------------------------------------------------
In this case, the port number "5563" in the above code has to be changed whenever it is changed in httpd.xml.
If the port number in the code becomes a variable, it would be much better.
Does anyone know that?
Thanks for your help.
Best Regards,
Hidekazu Tanaka