HI, Is there a way to get the Server ip address from an applet running on the client system. I know getCodeBase() or getDocumentBase() can be used. But i'ev got a problem here. When the applet is run on Internet Explorer getCodeBase() returns only the Server ip . But in Netscape it returns the Ip followed by Index.html. In this case i have to parse the getCodeBase() to get just the Server IP.I'm using Tomcat Server. How do i fix it??
Are you using getHost() on the URL returned by getCodeBase? I must admit, I don't see anything in the specs that say that getCodeBase MUST return an IP address anyway, so I don't know that you're doing this reliably. An IP address might not be authoritative anyway if you referenced a clustered server where the same hostname might return a connection to a different machine for each hit.
"privilege" comes from the Latin words for "private" and "law" (legal) and dates to feudal times. To "claim privilege" meant that you were above the laws that applied to the common people.
Sasparilla and fresh horses for all my men! You will see to it, won't you tiny ad?
Devious Experiments for a Truly Passive Greenhouse!