0 Replies Latest reply on Mar 11, 2010 11:30 PM by Neglo.Lee

    A bug of FB3

    Neglo.Lee

      I found a bug when execute "run as Flex Application" (Tomcat 5.5) in FB3. The port of my tomcat is "8088", but the port of auto-generated url is still "8080".

      I offer a program for reference.

      "

        ... ...

        org.eclipse.wst.server.core.IModule module = org.eclipse.wst.server.core.ServerUtil.getModule(currentProject);
        org.eclipse.wst.server.core.IServer[] servers = org.eclipse.wst.server.core.ServerUtil.getServersByModule(module, null);

        //servers = org.eclipse.wst.server.core.ServerCore.getServers();

        ... ...

        // get current server by state

        IServer server;

        String host = server.getHost();
        int port = 8080;
        ServerPort[] serverPorts = server.getServerPorts(null);
        for (ServerPort serverPort : serverPorts) {
             // http  protocol

             if (serverPort.getProtocol().equals("HTTP"))
                 port = serverPort.getPort();
        }    

       

      "

      We can get the port of server. I am a freshman, hope that helps you.