Java Applet - Embedding Into A Web Page

Embedding Into A Web Page

The applet can be displayed on the web page by making use of the deprecated applet HTML element, or the recommended object element. Embed element can be used with Mozilla family browsers (embed was deprecated in HTML 4 but is included in HTML 5). This specifies the applet's source and location. Object and embed tags can also download and install Java virtual machine (if required) or at least lead to the plugin page. Applet and object tags also support loading of the serialized applets that start in some particular (rather than initial) state. Tags also specify the message that shows up in place of the applet if the browser cannot run it due any reason.

However, despite object being officially a recommended tag, as of 2010, the support of the object tag was not yet consistent among browsers and Sun kept recommending the older applet tag for deploying in multibrowser environments, as it remained the only tag consistently supported by the most popular browsers. To support multiple browsers, the object tag currently requires JavaScript (that recognizes the browser and adjusts the tag), usage of additional browser-specific tags or delivering adapted output from the server side. Deprecating applet tag has been criticized. Oracle now provides a maintained JavaScript code to launch applets with cross platform workarounds.

Read more about this topic:  Java Applet

Famous quotes containing the words web and/or page:

    There she weaves by night and day
    A magic web with colours gay.
    Alfred Tennyson (1809–1892)

    Heav’n from all creatures, hides the book of Fate,
    All but the page prescrib’d, their present state:
    Alexander Pope (1688–1744)