Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with java database connectivity ?? java expert help needed?

 
atul anand
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my program have database connectivity,and i have used applet,which on click of button show the content of file(.mdb)

so as to grant permission to my applet i have used the following method

content of file: accs.txt
--------------------------------------...
grant {
permission java.lang.RuntimePermission
"accessClassInPackage.sun.jdbc.odbc";
permission java.util.PropertyPermission
"file.encoding", "read";
};
--------------------------------------...
and used this command:
appletviewer -J-Djava.security.policy=accs.txt searchtm.java

its working fine and showing output
but what i actually needed my program on web browser so i made html file with following code in it
search.html
--------------------------------------...
<html>
<head>
<title>SEARCH</title>
</head>
<body>
<h2>SEARCH</h2>
<applet code="searchtm.class" width=720 height=620>
</applet>
<hr>
</body>
</html>
--------------------------------------...
when i open my search.html it shows me the gui
but when i click on button it did not show me the output(i want it for local machine)
how to make it show the output on my search.html file as it was showing in applet by using appletviewer

plzzzz helpp

thanks in advance

* 9 hours ago
* - 3 days left to answ
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34095
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Atul,
Welcome to JavaRanch!

This sounds like an applet security question since it works properly from outside the browser. I'll move your thread to our applets forum where people are more likely to know the answer.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic