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:

    The soul knows only the soul; the web of events is the flowing robe in which she is clothed.
    Ralph Waldo Emerson (1803–1882)

    I asked myself, “Is it going to prevent me from getting out of here? Is there a risk of death attached to it? Is it permanently disabling? Is it permanently disfiguring? Lastly, is it excruciating?” If it doesn’t fit one of those five categories, then it isn’t important.
    Rhonda Cornum, United States Army Major. As quoted in Newsweek magazine, “Perspectives” page (July 13, 1992)