Applets are not allowed to open network connections to any computer, except for the host that provided the .class files. This is either the host where the html page came from, or the host specified in the codebase parameter in the applet tag, with codebase taking precendence. For example, if you try to do this from an applet that did not originate from the machine foo.com, it will fail with a security exception:  Socket s = new Socket("foo.com", 25, true);就是说你的web server和你的database server必须在同一个物理机器上
如果你突破安全限制的,也是比较麻烦的,如果数据库的地质改变了
你还要可能重新对你applet做安全数字签名!
 采用applet与servlet结合比较好!