先得搞清楚:
applet是运行在客户端,servlet,jsp运行在服务器端。运行在服务器端什么事都可以做,
但是在客户端的applet严格禁止任何读写本地文件的操作,当然不能访问本地数据库了。
applet能不能访问网络视安全设置而定。应当用servlet, jsp访问数据库,仅仅把结果返回客户端

解决方案 »

  1.   

    搂主的问题,好像是无解的。不用asp,jsp(servlet和jsp本质上是一样的),还能有什么做法呢??
      

  2.   

    我觉得applet能够访问她的来源处的数据库,不是让她访问本的数据库的。
    但是我还是担心applet能不能访问数据库。我是菜鸟,有问题多多指教
      

  3.   

    applet是可以访问数据库的,今天看到了一个帖子
    大家请看:
    http://www.csdn.net/develop/Read_Article.asp?Id=15810
      

  4.   

    我想applet来解决数据库问题不是很好的办法
    也看到了一些书籍,上面说一般不用applet
    而使用jsp+servler+javabean+ejb
    但是这样还要配置jsp,大家是怎样调试程序的?
      

  5.   

    Can the JDBC-ODBC Bridge be used with applets?Use of the JDBC-ODBC bridge from an untrusted applet running in a browser, such as Netscape Navigator, isn't allowed. The JDBC-ODBC bridge doesn't allow untrusted code to call it for security reasons. This is good because it means that an untrusted applet that is downloaded by the browser can't circumvent Java security by calling ODBC. Remember that ODBC is native code, so once ODBC is called the Java programming language can't guarantee that a security violation won't occur. On the other hand, Pure Java JDBC drivers work well with applets. They are fully downloadable and do not require any client-side configuration.Finally, we would like to note that it is possible to use the JDBC-ODBC bridge with applets that will be run in appletviewer since appletviewer assumes that applets are trusted. In general, it is dangerous to turn applet security off, but it may be appropriate in certain controlled situations, such as for applets that will only be used in a secure intranet environment. Remember to exercise caution if you choose this option, and use an all-Java JDBC driver whenever possible to avoid security problems.