请教各位一个问题,我现在做的一个项目服务器用的是Tomcat 6.0,要求在servlet和applet间传递数据,相应的ObjectInputStream和ObjectOutputStream都已经分别在Servlet端和Applet端实现。
因为要传递的数据需要在Applet端进行操作后再发送至Servlet,在这个过程中,我是否需要在Servlet端做相应的挂起处理?还是说Tomcat就会完成类似的处理,使Servlet在构建ObjectInputStream实例后即进入等待状态,准备接收数据?

解决方案 »

  1.   

    可以通过SOCKET来等待APPLET的过程啊,
    再将SOCKET等到的结果给 SERVLET啊  我觉得是这样的.  
      

  2.   

    use socket? but as the description of sun/oracle, when try to connect to the web, "the URL class and related classes (URLConnection, URLEncoder) are probably more appropriate than the socket classes". why do I still need the socket?
      

  3.   

     Agree. 
    Since Tomcat is servlet container which accepts HTTP rather than plain socket.
      

  4.   

    then how can I controll the "suspend" on servlet? because in my program, the servlet must wait for the data from applet. When I add the corresponding code directly in the servlet, there is always exceptions.