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.
An IDE is no substitute for an Intelligent Developer.
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads