aspose file tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes about IP Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Reply Bookmark "about IP" Watch "about IP" New topic
Author

about IP

David George
Greenhorn

Joined: Aug 25, 2005
Posts: 11
Should i allow the user to specify the IP address for server or use InetAddress to get the IP of server?
Jan Groth
Ranch Hand

Joined: Feb 03, 2004
Posts: 456
hi there,

in my unserstanding it's not a question of using InetAddress or not. correct me if i'm wrong, but i would say that there is no way to find out the ip address of the server (well, you can try out all ;-) )

so you have to have an option to enter an id-adress. (property files are forbidden for basic configuration.)

i implemented a little gui to enter the ip adress. i'm then constructing an InetAddress object out of it, first reason is for input verification, second reason is for type-safe communication between user-gui and data connector.

works pretty good so far ;-)

greets,
jan
David George
Greenhorn

Joined: Aug 25, 2005
Posts: 11
Maybe i had a wrong expression . I meant that if allow the server to config the IP in suncertify.property by InetAddress . Or when start the server , allow to enter the server's IP through the server' gui.
Jan Groth
Ranch Hand

Joined: Feb 03, 2004
Posts: 456
oh, i see....

well, it's a three-liner to find out the current ip, and it's way more comfortable for the user.

i'm reading out the ip & display it in the server gui, which has start & stop buttons & a filechooser.

greetings,
jan
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: about IP
 
Similar Threads
trying to connect to another ip adress
Can't connect to SQL server 2005
public JDBC
Need to configure DataSource
how to connect to my web application from another computer