Servlet & Applet Communication

zhaozj2021-02-17  51

It's really sorry, because the author is negligent, two articles about servlet and applet communication in 9CBS

(http://www.9cbs.net/develop/read_article.asp?id=14917

http://www.9cbs.net/develop/read_article.asp?id=14576) I have forgotten the production of the policy file. This should also be considered Applet security

Basic knowledge, first add as follows: On the author's article "Applet directly access the database" http://www.9cbs.net/develop/read_article.asp?id=15810

The production of Applet policy files is described in one article. There are two ways to make a policy file, one is the PolicyTool tool with the JDK, which provides a graphical interface for

Applet allocation permissions, the other is to directly edit the policy file. For beginners, the first way is appropriate, skilled, and directly edited the relatively fast. I will

Tell how to edit its strategy files directly. The name of the policy file is ".java.policy", this file must be placed in the user's root directory, in the Windows2000 system

Next, for the operating system where the disk is located: / documents and settings / username directory, such as my system is installed in the C drive, the user is an administrator, then this directory

It is C: / Documents and Settings / Administrator. ".java.policy" file cannot be created in the Windows2000 graphical interface, you can

Open a command line window, enter the C: / Documents and Settings / Administrator, create a text file under the graphical interface, such as named

Java.Policy, then use DOS command c: / documents and settings / administrator> move java.policy .java.poli, then use a editor, open the file, enter the content, the content may be similar to the lower: grant {permission java.lang.RuntimePermission "accessClassInPackage.com.microsoft.util"; permission java.lang.RuntimePermission "accessClassInPackage.com.microsoft.jdbc"; permission java.lang.RuntimePermission "accessClassInPackage.com.microsoft.jdbcx"; Permission java.net.SocketPermission "192.9.200.52:1433", "connect";

Save it. The first line to the third line is awarded the authority to the applet to access three packets. The fourth line is awarded the Applet connection 192.9.200.52:1433 address port

permission. Ok, I will here, I hope to help the netizens in the lost. Zlyperson@163.net

转载请注明原文地址:https://www.9cbs.com/read-29338.html

New Post(0)