1 Reply Latest reply on Oct 4, 2004 10:18 AM by poojac20

    Can Servlet listen to user-specified port?

    poojac20

      Hi

      Yes/No Question.
      Is it possible to configure my servlet in such a way that it listens to a prticular port, Say 7001. I want my clients to access this servlet NOT thru HTTP request to jboss port 8080 but by posting bytes directly on 7001. The client only knows ip address & port number of the host and has no knowledge of servlet existence. It only knows to send bytes in a particualr order.

      Will I need to write a separate redirector which will wrap these bytes in HTTP [And hence get into the mess of managing threads for mutliple clients and sockets]
      :-(

      Or is it possible to route everything on 7001 to my servlet automatically?

      Thanx for ne insight

      --- Pooja.

        • 1. Re: Can Servlet listen to user-specified port?
          poojac20

          More Question - What if I extend GenericServlet and write a non-protocol-specific Servlet? Can that be an answer to my problem?

          Can I make the appserver divert all requests to a port to this servlet's service method without having to write socket level code?