Reputation: 11
My app is running in a Server(windows 7, Apache Tomcat 7.0) which is connected to a LAN.
My server's IP often changes as the LAN provides dynamic IP.
I want to connect to this app from another systems which are in the same LAN.
Currently I am using IP to connect to the server system.
But as it has dynamic IP I can't relay on it.
Please suggest me a better way to overcome this issue.
Making IP static is not at all an option.
Upvotes: 0
Views: 221
Reputation: 2138
you can use system name instead of ip.
for example 10.17.4.51:8080/helloWorld.html can be called like sarinPC:8080/helloWorld.html
For finding your systemname, open your myComputer => right click => properties
In the newly opened window, you can find system name.
Even if your ip gets changed, your system name will not change, that makes it ideal solution for you.
Note : This logic works like this only in a LAN.
Upvotes: 2
Reputation: 493
The router that connects all the LAN devices have that feature. You can ask your administrator to bind you PC mac address to particular ip address. That way that ip address will always be assigned to your pc only.
This is known as address reservation. A sample tutorial can be found here https://www.youtube.com/watch?v=9FzKxMiZWgg
Upvotes: 0