File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

JApplet to access Database on server from client maschine

 
Rituraj Jain
Ranch Hand
Posts: 37
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have made a code in JApplet and trying to run that from Tomcat server by embedding that applet code in JSP. Coderuns fine untill unless i dont use any database access in it

but now i am trying to access Data base which is on server machine the applet code is not working

i know that i need to sign the applet to give it permissions of accessing database but how to sign it (give permission) thats what i don't know.

if i have to run the code through appletviewer then i can sign it with policy tool of java, but i case of server what to do i dont know???

please help!!!

following is error trace on the applet console.

 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The policy tool has nothing to do with signing an applet. HowCanAnAppletReadFilesOnTheLocalFileSystem has all the information you need to get you started with signing an applet.
 
Rituraj Jain
Ranch Hand
Posts: 37
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply i am surely going to read every link on that tutorial but if you don't mind i would like to say that i don't want access any file on client system but i want to query database that is on server and dynamically generate applet.


 
Ulf Dittmer
Rancher
Pie
Posts: 42966
73
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know. Read that page first, then you'll understand :-)
 
Rituraj Jain
Ranch Hand
Posts: 37
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
thanks buddy, i read all the links on that page plus all the links on other linked pages and i got what i wanted

should i post the solution/steps for creating and running signed applet here or i am not supposed to post the solution here??

again thanks for the link
 
Rob Spoor
Sheriff
Pie
Posts: 20396
47
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your solution was signing the JAR only then that's pretty straightforward. The biggest problem with it is that a lot of people just don't know they have to do it
 
Rituraj Jain
Ranch Hand
Posts: 37
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ya you are right. i also had a funniest problem that i wanted to sign the Applet and was not even thought of signing the jar file..

its pretty straight just sign the jar, load applet, it will ask user whether to trust the supplier or not...if he says yer then every thing is fine...


 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic