Hello all I am making a chat application in which i use JSP and Servlet Now I have provided the normal login page that is in swing that calls the servlet and does the authentication with the server against databse
Now i would only be giving the swing gui to the client in a jar But the IP that i pass while compiling and making a jar of swing client is static
Now every time the server changes i need to recompile the class file Taking the case of yahoo that must be having many servers but the client never needs to specify the IP
Is there any way that my client can get the IP without me having to recompile it everytime before giving it to the client
Thanks Regards Monarch
Joined: Jan 15, 2004
Usually no ip address is passed, instead a servername is used, so the resolution of the address is done by the DNS.
But if you have resources that need to be read dynamically you can use ResourceBundles.
This technique is usually applied to localize an application for different languages, but you can use it for each information that has to be stored outside of the class.