aspose file tools*
The moose likes Applets and the fly likes Applet not accessing database while running through browser Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Applet not accessing database while running through browser" Watch "Applet not accessing database while running through browser" New topic
Author

Applet not accessing database while running through browser

samit majumdar
Greenhorn

Joined: Jun 09, 2004
Posts: 11
Hi friends!
I am facing a problem while using an applet to access the database through browser only. It is working fine while running through appletviewer. The error message is :

java.sql.AccessDeniedException:No connection found(java.lang.RuntimePermission error)

I am using Tomcat as a web server and using JDBC-ODBC bridge.

It is not that the security permissions are not set properly. I claim so as the same applet is doing the file input and output operations quite efficiently. It is creating problems only while accessing the database(that too while accessing through browser only, not through appletviewer). Is it due to the JDBC-ODBC bridge? Should I use type 3 or 4 pure Java Drivers for accessing the database? Is it must to use type 3 or 4 pure java drivers?

I tried to run an evaluation version of type 4 pure java driver. But I failed to use it successfully, although I went through the manual thoroughly. Could you suggest some FREE type 3 or 4 pure java drivers? Where from I can download those FREE drivers?

Awaiting for your suggestions....

Thanks and Regards-

SAMIT KUMAR MAJUMDAR.
Jasmine kaur
Ranch Hand

Joined: Nov 25, 2003
Posts: 160
Hello,
well u are using applet and applet can read and write files of its own directory but applet cannot acess any file out of its directoryand it gives exception ,well in tomcat or any other server if applet is accessing file in another directory the u have to give rights in java policy file or in Tomcat you can give in catalina .policy file, when there is a database connecetion with applet please check wheteher you have give datasource reference in server.xml or not.
Well do mail if u need any help.
Thanks


jasmine kaur
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Applet not accessing database while running through browser