applet1.java
import java.applet.*;
import java.awt.*;
public class applet1 extends Applet
{
public void init()
{
setBackground(Color.blue);
}
public void paint(Graphics g)
{
g.drawString("Welcome to Applet !!!! ", 50,50);
}
}
-------------------------------------------------------------
index.jsp
<html>
<head>
<title>Prgram 10 </title>
</head>
<body>
<h1> Welcome this is an applet demo </h1>
<jsp:plugin type="applet" code="applet1.class" height="100" width="400" codebase="http://localhost:41274/Prg10/">
<jsp:fallback> Unable to load applet </jsp:fallback>
</jsp:plugin>
</body>
</html>
Thursday, 12 February 2015
10. Write a JAVA JSP Program which uses tag to run a applet.
Labels:
J2EE

No comments:
Post a Comment