Using the Nfc java client-applet

  • Daniel Tahin

    Daniel Tahin - 2003-12-11

    Hello everybody!

    Please excuse me, I post my first message as a reply and not a new thread...:-)

    So my problem is:
    I would like to make a private chat, but I the server is not constant (f.g: at
    thuesday the server is:,  and on an other day:
    Now I made a site with a cgi script, that allows to get and update the current
    server name.
    I seen, that the applet-client allows to set the host parameter, but if it is
    different that the name of the server, from where you can download this
    applet, I get some Java errors: " access
    ( resolve)". And I can't connect to
    Is it possible to download the applet from and connect f.g: to  (so the host parameter would be in this case

    I would be very thankful for your answer.

    • Sebastian Eichner

      This is because of the security restrictions for applets imposed by the security manager of the JVM.
      Maybe this gives you the right point to start from, you should look at the applet security restrictions.


    • Daniel Tahin

      Daniel Tahin - 2003-12-12

      Thank you for your posting.
      Where can I find it?  In the java/jre/bin directory there is a shell-script: ControlPanel. Is this what you mentioned?
      The author of this software told me to create a signed applet, that give me the privileges to connect to an other host.
      But I don't have a lot of experience to do this.
      In the ControlPanel  found an option to manage the certificates. Is that the right place to allow the applet to conect to another host?

      Thank you again for your help and your patience:-)

      • Sebastian Eichner

        Sorry, I cannot give you a howto-like advise, as i never played with applet's permissions. You should get a little bit familiar with the java security model.

        You can find information e.g. on these sites:
        ("Lesson: Quick Tour of Controlling Applets" and "Signing Code and Granting It Permissions" should help you)

        Just make sure that the documentation you read refers to JDK >=1.2 as the security model changed after 1.1.

        After you succeeded (i am sure you will), you might want to post a short description here. Just in case somebody else meets the same problem...

        Good luck,

    • Daniel Tahin

      Daniel Tahin - 2003-12-16

      Thank you for the link. It runs correctly... I worked long hours, because in the URL there is a "~" character, and if I specifie the full URL it didn't work. So I can only specifie the host-part of the URL.... Do you know, how to avoid this problem?
      And a (hopefully:-))) last question: can I configure the server or the client to ping all of their clients/server periodically?

      Thanx for the answer, and see my posting about "How to grant permisson to the applet"...

      • Sebastian Eichner

        Hi Daniel,

        nice to hear that it's finally working... :-)

        I am not sure which url you are talking about: the url for the applets socket connection does not include any path, because you just name a server and a port.

        The url for the tunnel-servlet might include a path as defined in the app-servers servlet-mapping. If this does not work, then it's probably a bug (either in nfc or your servlet-config).

        What exactly do you mean with "ping all of their clients/server periodically"?

        The server does take care of dead clients by the ping/pong-messages in both socket and tunnel mode. Clients are killed after a specific timeout.


    • Daniel Tahin

      Daniel Tahin - 2003-12-16

      Ok this wasn't  unambiguous. I mentioned the url found in the policy file:-).
      And the other thing: if the client sends the ping command, this means the client sends data to server. This would be usefull for me, because my internet connection is set to go down, if I idle. But when the client sends periodically data to server, I have continually a data-stream, and it wouldn't go down:-))

      Thanx again for the help:-)

      • Sebastian Eichner

        Ah, the policy-file... well, i don't know. But this should probably work with every valid url.

        You would have to modify the client to make it send data periodically without receiving a ping from the server.

        But the current ping/pong should do the job too, i think: the server pings your client, the client pongs back and by this the timeout for you internet connection should be canceled. I suppose there is an option to set the interval that the server sends its ping. Maybe you check this...?

        Thanks for the policy-documentation!


    • Daniel Tahin

      Daniel Tahin - 2003-12-19

      Thank you for the hint, but I think it doesn't work. Perhaps,  because I didn't configure the server correctly:-)
      What i did: put the following lines into  and into nfc.conf: ping.pingseconds = 30  /  ping.intervall = 1  /  ping.pingminutes = 1  (of course only one at the same time).

      Do you have any idea?


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks