This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes JApplet to access Database on server from client maschine Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "JApplet to access Database on server from client maschine" Watch "JApplet to access Database on server from client maschine" New topic
Author

JApplet to access Database on server from client maschine

Rituraj Jain
Ranch Hand

Joined: Nov 28, 2008
Posts: 37
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.


Rituraj Jain
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 39578
    
  27
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.


Ping & DNS - updated with new look and Ping home screen widget
Rituraj Jain
Ranch Hand

Joined: Nov 28, 2008
Posts: 37
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
Marshal

Joined: Mar 22, 2005
Posts: 39578
    
  27
I know. Read that page first, then you'll understand :-)
Rituraj Jain
Ranch Hand

Joined: Nov 28, 2008
Posts: 37
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

Joined: Oct 27, 2005
Posts: 19556
    
  16

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


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Rituraj Jain
Ranch Hand

Joined: Nov 28, 2008
Posts: 37
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
 
subject: JApplet to access Database on server from client maschine
 
Similar Threads
Exception during connecting to sql server2005
Access denied error for midi file in same directory as applet!
SQL Database to Java using JDBC
Problem putting applet on Web page
Applet in JSP