How to sign and get dynamic authorization?
Hello....
I'm new here and would like to have some help with my applet...
My plan is to do an applet with database access, but I did one to connect, nothing else, to a web page.
I think this is the same history everyones tells....My applet works on my IDE, but does not on my browser. It throws a security exception.
I read something about applets and noticed that I mustsign my applet, cause it磗 going to be available for anyone. I磛e fell in with many unsolved problems, but I think that the main one is thatthe client must import the certificate to use the applet. I didn磘 understand how it works and would like to know that!
I also read that I can do a kind ofwindow to appear asking the user to trust or not on my applet. How can I do that?
Anyother information that I should know would also be interesting.
If anyone can help me, I磀 be glad!
Thanks for the attention.
Message was edited by:
gbazilio
[1012 byte] By [
gbazilioa] at [2007-11-26 13:29:51]

# 1
I think there are 3 possible problems surfacing here and from what little information you provided I think they all originate from a little confusion with regards to applets vs. programs started with Java webstart.
An applet runs on the client machine in the browser. It is therefor quite limited with regards to accessing certain assets on the server its presented on as well as unpredictable with regards to accessing parts of the client machine (this depends on the security manager settings on the client machine).
A regular Java program can be deployed using Java webstart. In this case it is downloaded to the client machine and then (optionally) started. When the client machine does not explicitly trust your code (or signature) then the webstart program (javaws) will ask for confirmation. It seems you mistakenly confuse this with applets. Java webstart has nothing to do with applets.
I'd suggest doing some reading up..
First the trail on applets:
http://java.sun.com/docs/books/tutorial/deployment/applet/index.html
This is the information you were looking for with regards to signing applets and the likes. Also notice the webstart trail and simply check the differences:
http://java.sun.com/docs/books/tutorial/deployment/index.html
Finally, this trail will give you some more insights on how security works within Java. It will also give you a better understanding to the why and how when it comes to running signed and unsigned code:
http://java.sun.com/docs/books/tutorial/security/index.html
All of this stuff can also be downloaded, I'd suggest visiting http://www.thejavatutorial.com/ and doing some good old fashioned research.