建议你把:
java.net.URL url = new java.net.URL(getDocumentBase(),"servlet/DataStreamEcho");  
这行换掉:
java.net.URL url = new java.net.URL("http://127.0.0.1:8080/SiteName/servlet/DataStreamEcho"); 

解决方案 »

  1.   

    Thrown to indicate that an unknown service exception has occurred. Either the MIME type returned by a URL connection does not make sense, or the application is attempting to write to a read-only URL connection. 输出的mime类型不对,比如说image/gif的mime输出类型却没有输出gif,
    或则是试图写只读的connection.
    是否是因为你在applet中的输出和在service中的输出不是同中类型的数据??