How to determine the URL of the server registered on Netbeans

View: New views
1 Messages — Rating Filter:   Alert me  

How to determine the URL of the server registered on Netbeans

by ag_sachin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

We can get the list of server instances using..

String[] servers = Deployment.getDefault().getServerInstanceIDs();
       
        for(String serverId: servers){
            serverList.addItem(Deployment.getDefault().getServerInstanceDisplayName(serverId));
           
        }


Now i want to get the URL of each server on which application is run on that server.

For e.g. i have Glassfish V2 registered, which i configured to run application on 8050 (or anything else) instead of 8080, so my URL should be like localhost:8050.

I want to do that for Glassfish/Tomcat only.

Regards,
Sachin.