Win a copy of AWS Security this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Junilu Lacar
  • Henry Wong
  • Ron McLeod
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Frits Walraven
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • salvin francis
  • fred rosenberger

Reagarding Access on databse and file system from applet in same code base

Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I tried to access databse and file system from the same codebase thro' applet getting exception.
But form code base its not supposed to do right??
I used access and Jdbc dbc driver.Could you kindly give the code snippet relevant to that.
The applet class and its dependencies as well as
the DAO class all in the tomcat server root dir.
What i did.
Properties prop=new Properties();
prop.put("",new File("MyPolicy.policy"));
grant {
permission "developer",
permission java.lang.RuntimePermission
permission java.util.PropertyPermission
"file.encoding", "read";
It would read the files from "." dir current dir and make hir.
Now the exception
cannot access File.
kindly give these section code and policy file if reqd or alternative way to access file system as well as database.

They weren't very bright, but they were very, very big. Ad contrast:
Devious Experiments for a Truly Passive Greenhouse!
    Bookmark Topic Watch Topic
  • New Topic