Closed Thread
Results 1 to 3 of 3

Thread: Server URL

  1. #1
    ld_pvl is offline Learning Programmer
    Join Date
    Oct 2008
    Posts
    46
    Rep Power
    0

    Server URL

    Hello,

    How can I get the current URL of the server on which my applet is currently in?

    Thank you,
    LD

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    Join Date
    Apr 2009
    Location
    Trapped in my own little world.
    Posts
    2,487
    Rep Power
    33

    Re: Server URL

    If your on windows you can ping it in command line.

    "ping www.google.com" then itll tell you.

    I found a site just by googling "website ip address"
    Find IP address of a website - server ip lookup

  4. #3
    ld_pvl is offline Learning Programmer
    Join Date
    Oct 2008
    Posts
    46
    Rep Power
    0

    Re: Server URL

    Quote Originally Posted by BlaineSch View Post
    If your on windows you can ping it in command line.

    "ping www.google.com" then itll tell you.

    I found a site just by googling "website ip address"
    Find IP address of a website - server ip lookup
    Actually what I meant was to retrieve the URL of the host containing the Applet's class.

    I found out about it. To those who are looking for the same answer, you can do it like this:

    Code:
    public class AnApplet() extends JApplet {
    
          public URL GetHostUrl() {
               
               URL url; 
               url = this.getcodeBase();
               return url;
          }
    }
    Basically something like this.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 12
    Last Post: 09-02-2011, 09:32 PM
  2. remote commands to windows server from linux server
    By centsinger in forum PHP Development
    Replies: 2
    Last Post: 06-15-2010, 08:00 AM
  3. Replies: 4
    Last Post: 05-22-2010, 04:48 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts