Google News
logo
JSP - Interview Questions
How can the applets be displayed in the JSP? Explain with an example.
The jsp:plugin action tag is used to embed an applet in the JSP file. The jsp:plugin action tag downloads plugin at client side to execute an applet or bean.
 
Example of displaying applet in JSP : 
<html>    
    <head>    
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">    
        <title>Mouse Drag</title>    
    </head>    
    <body bgcolor="red">    
<h1>Mouse Drag Example</h1>    
    
 <jsp:plugin align="middle" height="450" width="450"    
     type="applet"  code="mousedrag.class" name="clock" codebase="."/>    
    
    </body>    
</html>
Advertisement