2 Replies Latest reply on Feb 12, 2006 9:49 AM by Moritz Schmidt

    Java Web Start

    Moritz Schmidt Newbie


      I'm new to J2EE application development. At first I tried to build some EJBs and an client. They both work fine and I got the client to work with java web start.
      Now the question:
      How do I determine the server IP from which my client was loaded to access JBoss with my EJBs?

      Please help?

      Thanks in advance.

      Best regards,


        • 1. Re: Java Web Start
          Martin Hejl Newbie

          Hi Moritz,
          I don't know of a way to find out which Server the app was loaded from, if one is using JWS. But since you need more info anyway (like, the port number) why not specify the info needed in the jnlp file?
          For example

          <property name="jboss.server" value="serverNameOrIP"/>
          <property name="jboss.port" value="portNum"/>

          That way, you can access the info using
          System.getProperty("jboss.server") and System.getProperty("jboss.port")

          to retrieve the values.
          This also has the added benefit that you can still start your app without JWS, simply by adding
          -Djboss.server=serverName -Djboss.port=portnum
          to the command line (nice for debugging the client).

          Not exactly what you're asking for, but maybe that helps.


          • 2. Re: Java Web Start
            Moritz Schmidt Newbie

            Hi Martin,

            this is maybe a solution. I think this will help.