I want to get the server hostname using Java while starting the server.
Before that i was used HTTP servlet request but I cannot get the request during start the server it's shows null pointer exception.
Can you help to get the solution for this.
I want the solution like this.
localhost:8080 or some other ip server with port