Embed the Java Applet in Your SharePoint Site

To embed the Java Applet in your SharePoint site, edit the page that contains the applet and add a new Script Editor Web Part next to an existing Documents web part.

Note

It is recommended that you deselect the Enable Java content in the browser option from the Java Control Panel until you finish editing the page. Otherwise, the browser will load the applet for every change that you will make.

Edit the page directly in your browser, following these steps:

  1. Go to the home page of your SharePoint site where you want to add the Author Component Java applet.
  2. Select the Page tab from the ribbon located at top of the page and click the Edit button.
  3. Select the Insert tab and click Web Part.
  4. In the Categories panel, select Media and Content.
  5. In the Parts panel, select the Script Editor Web Part.
  6. Click the Add button to insert the selected Web Part to your page content.
  7. Select the newly added Web Part.
  8. Select the Web Part tab and click the Web Part Properties button.
  9. Click the Edit Snippet link under your Web Part.
  10. Insert the following HTML snippet to your newly created Web Part:
    <div>
        <iframe 
           id="appletIFrame" 
           src="/applet/SitePages/author-component/author-component-dita.aspx"
           width="800px" height="850px">
        </iframe>
        <script type="text/JavaScript">
            function openInAuthor(itemUrl) {          
                var appletFrame = document.getElementById("appletIFrame");
                var appletWin = appletFrame.contentWindow;        
                appletWin.openListItemInAuthor(itemUrl);
            }
        </script>
    </div>
    The above HTML fragment contains an IFrame that points to the page where the Java applet resides. Replace the value of the src attribute with the path of the author-component-dita.aspx HTML page that you added earlier to the SitePages folder;

    Note

    Use the iframe element from the HTML fragment with the expanded form (<iframe></iframe>). Otherwise, the Web Part will not display the target page of the frame.
  11. Save the changes you made to the page.

    Note

    Do not forget to select the Enable Java content in the browser, to allow the browser to load the Java applet.

Was this helpful?