Results 1 to 10 of 10
  1. #1
    jimhaddon is offline Member
    Join Date
    Aug 2008
    Posts
    5
    Rep Power
    0

    Default Connectivity Test

    Hi All, first time poster....

    I need a really simple java applet that just attempts to connect to a server on a specific port. The reason for this is we are loading software on site's machines but some are having trouble with Proxies / Firewalls. If an applet could load, then check and display a result - this would help us immensely.

    Any ideas anyone?

    Cheers!

    J

  2. #2
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,564
    Rep Power
    23

    Default

    Why do you need an applet? Can't you use a browser?
    For example enter: http://somewhere.com:8000 in the browser's address field.

    Can you explain the setup better?

  3. #3
    jimhaddon is offline Member
    Join Date
    Aug 2008
    Posts
    5
    Rep Power
    0

    Default

    Yes sorry,

    This software is going out thousands of users across the UK. A lot of the users will have little experience with using a computer, getting them to type in a URL with port numbers would be way too difficult. We already have a 'PC Check' page which uses javascript to detect if they have the neccessary software requirements such as Flash, Shockwave etc. It would be great if we could have an applet that loads up on the same page that indicates to them quite clearley if something is not right.

    Cheers,

    James

  4. #4
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,564
    Rep Power
    23

    Default

    Can you explain the setup better?
    For example, you have a website that the user will go to with his browser. That website will return an HTML page with an applet. That applet will then ask the website it was just loaded from some questions and then indicates to them quite clearly if something is not right.
    Is that what you are looking for?
    There would have to be code of some kind on the server the applet was loaded from to answer the questions the applet is asking and to give a response to the applet.

  5. #5
    jimhaddon is offline Member
    Join Date
    Aug 2008
    Posts
    5
    Rep Power
    0

    Default

    No, a user will load a webpage which will try to connect to another webserver on port 443. The page will tell them whether it was able to make a connection.

    An example is here:

    gvsi.com / javatest / checklist.asp

    test 4b

  6. #6
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,564
    Rep Power
    23

    Default

    another webserver
    Applets(without permission) are only allowed to connect to the site they were loaded from.
    You can put the applet in a jar file and sign it. That may allow the user to grant permission for the applet to connect to another site.

  7. #7
    jimhaddon is offline Member
    Join Date
    Aug 2008
    Posts
    5
    Rep Power
    0

    Default

    Yes - this would be possible, we could load the jar on the same server/domain, but just get it to check port 443 when loaded.

    Where would I start though!

  8. #8
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,564
    Rep Power
    23

    Default

    load the jar on the same server/domain
    Does that mean that the HTML/applet would be loaded from the server that has port 443 you want to test?
    The applet code would use a Socket class with port 443 and use the getCodeBase() method to get the address of the server it was loaded from.
    If you'd like a demo of a signed jar, I signed a jar for testing a while ago and put it on a web site. It will try to read a file: C:\\AppletTestFile.txt
    Its at: Applet Reader
    My browser asks me if I want to trust it. If I do, it will read and display the contents of the file.

  9. #9
    jimhaddon is offline Member
    Join Date
    Aug 2008
    Posts
    5
    Rep Power
    0

    Default

    But where would I start with the applet! I have an idea but not sure its correct
    Last edited by jimhaddon; 08-16-2008 at 04:42 PM.

  10. #10
    Norm's Avatar
    Norm is offline Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    16,564
    Rep Power
    23

    Default

    I guess you need to find a java programmer to write it for you.

    What are your requirements? Have you an idea of what exactly the applet is supposed to do? If it connects at a port what is it supposed to send to that port and what is it supposed to receive as response? etd

Similar Threads

  1. database connectivity
    By rilwanfit in forum Networking
    Replies: 1
    Last Post: 03-13-2009, 07:54 PM
  2. Connectivity between Servlet and Midlet
    By adarsh_2484 in forum New To Java
    Replies: 1
    Last Post: 07-29-2008, 04:09 PM
  3. java database connectivity
    By thamizhisai in forum Advanced Java
    Replies: 1
    Last Post: 04-28-2008, 05:59 PM
  4. ensure connectivity
    By perdoname in forum JDBC
    Replies: 1
    Last Post: 04-22-2008, 02:29 AM
  5. Replies: 0
    Last Post: 04-05-2008, 12:38 AM

Posting Permissions

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