Hi, I keep hearing people refer to signed and unsigned applets and how it effects your servlet/database connection rights. Could anyone give me a more detailed explaination of signing and what it actualy means? thanks
Signing is an extra packaging option that allows you to gains powers outside the sandbox. To create a signed applet you bundle up all its classes into a jar, include a customized java permissions file and run the jar through the jarsigning utility. The resulting jar now contains signatures that are computed based on the original contents of the jar. If anyone attempts to alter the jar's contents (including the permissions file) in any way, the signatures will no longer compute properly, thus indicating that the jar is no longer to be trusted. What makes it a little stickier is that Microsoft and Netscape had different processes for signing. It's been far too long since I've read up on the details for me to say how, though, and things are different now anyway. The ability to sign applets is a powerful one and, when used properly, can be part of a truly great Internet application. However, a lot of people want to use it where they shouldn't, simply because the "proper" way to do things over the Internet is not the way they're used to doing things and because it takes extra work - including more support from the server side. Here's the 3 most common reasons why people want signed applets, and some pros and cons 1. JDBC (2-tier solution). Pro: can offload more work onto the client. Con: can result in extra network overhead, is less portable, may not work through firewalls. Also, consider SQL Slammer. Alternative: 3-tier application. 2. Local file access. Pro: can save critical information for access offline. Con: In an enterprise environment, it's a lot easier to keep critical information backed up and secured if it's centrally managed and not splattered all over everyone's computers. Stolen laptops containing critical files are a related hazard. Alternative: work with data locally (in memory), but keep the persistent info back at the server. 3. Printing. Pro: Unless you sign an applet, it cannot print. Con: Sun's printing system isn't all that wonderful. One thing Microsoft has done that I wish Sun had was allow the graphics subsystem to scale in terms on absolute physical measurements (e.g. millimeters) and not just pixels. Alternative: Create a PDF on the server for download and printing.
Sometimes the only way things ever got fixed is because people became uncomfortable.