Huyong,
     usually this bind exception comes when you try to listen  2 things on
same port .

For eg: I got this error because I was trying to listen on the  same
port(8080)for servletrunner and   java web server(jeeves)
        so when I tried  running my  servletrunner it gave bind exception
Address in use.
        Then I tried to listen on the port(8081)  for
webserver-(jeeves)------

        Then that exception stopped, hope this tip works in your case!...
        GOODLUCK.
> From:         Huyong2k[SMTP:[EMAIL PROTECTED]]
> Reply To:     A mailing list for discussion about Sun Microsystem's Java
> Servlet API Technology.
> Sent:         Friday, October 08, 1999 8:18 AM
> To:   [EMAIL PROTECTED]
> Subject:      About BindException
>
> Hi,
> I write a servlet  listening a socket  to accept applet's request,but
> there is a error:
> j a v a . n e t . B i n d E x c e p t i o n :   A d d r e s s   i n   u s
> e.
>
> The following is the code:
>
> public class UsersServlet extends HttpServlet implements Runnable{
>
>   static int SERVLET_PORT=10000;
>
>   ServerSocket  serverSocket;
>
>   RandomAccessFile myfile;
>
>   Thread mythread=new Thread(this);
>
>   public void run(){
>     try{
>         serverSocket = new ServerSocket(SERVLET_PORT);
>
>         while (true)
>            handleClient(serverSocket.accept());
>          }catch(IOException e){}
>
>
>   }
>
>   public void init(ServletConfig config) throws ServletException {
>         super.init(config);
>         mythread.start();
>
>   }
>
> public void handleClient(Socket client){
>     new UserConnection(this, client).start();
>
> Any suggetion is helpful to me.
>
> Regards
> Huyong
>

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to