文档

Java™ 教程-Java Tutorials 中文版
Trail: Deployment
Lesson: Doing More With Java Rich Internet Applications
主页>部署>使用 Java Rich Internet Applications 做更多事情

问题和练习的答案:利用富 Internet 应用程序做更多事

问题

  1. 问题:对或错:Rich Internet applications (RIAs) can set secure properties by prefixing the property name with "jnlp.".

    答案:True: Rich Internet applications (RIAs) can set secure properties by prefixing the property name with "jnlp." or "javaws.".

  2. 问题:对或错:Only signed RIAs can use JNLP API to access files on the client.

    答案:False: Unsigned RIAs can also use JNLP API to access files on the client.

练习

  1. 练习:To the following JNLP file, add a secure property called jnlp.foo and set its value to true.
    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+" codebase="" href="">
        <information>
            <title>Dynamic Tree Demo</title>
            <vendor>Dynamic Team</vendor>
    
        </information>
        <resources>
            <!-- Application Resources -->
            <j2se version="1.6+"
                  href="http://java.sun.com/products/autodl/j2se" />
            <jar href="DynamicTreeDemo.jar" main="true" />
        </resources>
        <applet-desc 
             name="Dynamic Tree Demo Applet"
             main-class="components.DynamicTreeApplet"
             width="300"
             height="300">
         </applet-desc>
         <update check="background"/>
    </jnlp>                           
    

    答案:

    <?xml version="1.0" encoding="UTF-8"?>
    <jnlp spec="1.0+" codebase="" href="">
        <information>
            <title>Dynamic Tree Demo</title>
            <vendor>Dynamic Team</vendor>
    
        </information>
        <resources>
            <!-- Application Resources -->
            <j2se version="1.6+"
                  href="http://java.sun.com/products/autodl/j2se" />
            <jar href="DynamicTreeDemo.jar" main="true" />
            <property name="jnlp.foo" value="true"/>
        </resources>
        <applet-desc 
             name="Dynamic Tree Demo Applet"
             main-class="components.DynamicTreeApplet"
             width="300"
             height="300">
         </applet-desc>
         <update check="background"/>
    </jnlp>   
    

Previous page: Questions and Exercises: Doing More With Rich Internet Applications