Hi,
   My needs is below:
   I want to have a servlet ,which initiate a ServerSocket , then waiting for client's 
connection. the client is
a Applet.I do is in my servlet.
////////////////////////////////////////////////////////////////

 public void init() throws ServletException {
    //class server i defined in another file.
    server server1=new server(8888);
    GSIServerSocket ssock = null;
    IaikGSISocket sock;
    GlobusProxy proxy = null;
    InputStream in = null;
    OutputStream out = null;
    try{
      sock = (IaikGSISocket)ssock.accept();
      out = sock.getOutputStream();
      in = sock.getInputStream();
      proxy = sock.handleDelegation();
    }catch(IOException e){
      System.out.println("Error:accept!");
      e.printStackTrace(System.err);
    }
 }
////////////////////////////////////////////////////////////////
I test my servlet,Errors,have you any idea to do this?thanks a lot.


java.lang.NullPointerException
        at demoservlet.Servlet1.init(Servlet1.java:37)
        at javax.servlet.GenericServlet.init(GenericServlet.java:258)
        at com.caucho.server.http.Application.createServlet(Application.java:3103)
        at com.caucho.server.http.Application.loadServlet(Application.java:3054)
        at com.caucho.server.http.QServletConfig.loadServlet(QServletConfig.java:418)
        at 
com.caucho.server.http.Application.getFilterChainServlet(Application.java:2794)
        at com.caucho.server.http.Application.buildFilterChain(Application.java:2750)
        at com.caucho.server.http.Invocation.service(Invocation.java:310)
        at com.caucho.server.http.CacheInvocation.service(CacheInvocation.java:135)
        at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:244)
        at com.caucho.server.http.HttpRequest.handleConnection(HttpRequest.java:163)
        at com.caucho.server.TcpConnection.run(TcpConnection.java:137)
        at java.lang.Thread.run(Thread.java:536)





J.H,Feng

___________________________________________________________________________
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