Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring 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 ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

JApplet to access Database on server from client maschine

 
Ranch Hand
Posts: 37
  • 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.

 
Rancher
Posts: 43016
76
  • 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
  • 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
Posts: 43016
76
  • 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
  • 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
 
Sheriff
Posts: 21972
106
Eclipse IDE Spring VI Editor Chrome Java Ubuntu Windows
  • 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
  • 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...


 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
    Bookmark Topic Watch Topic
  • New Topic