Displaying Applet In Jsp (jsp:plugin Action Tag)


The jsp:plugin movement tag is used to embed an applet withinside the jsp file. The jsp:plugin movement tag downloads plugin at customer aspect to execute an applet or bean.

Syntax of Jsp:plugin Action Tag

<jsp:plugin type= "applet ' bean" code= "nameOfClassFile"   
codebase= "directoryNameOfClassFile"  

Example of Displaying Applet in JSP

In this example, we're certainly showing the applet in jsp the usage of the jsp:plugin tag. You need to have MouseDrag.class record (an applet class record) withinside the contemporary folder in which JSP report resides. You may also sincerely download this application that consists of index.jsp, MouseDrag.java, and MouseDrag.class documents to run this application.


        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">  
        <title>Mouse Drag</title>  
    <body bgcolor="khaki">  
<h1>Mouse Drag Example</h1>  
 <jsp:plugin align="middle" height="500" width="500"  
     type="applet"  code="MouseDrag.class" name="clock" codebase="."/>  

download this example