Hi, I'm trying to open another page through a servelt and am not getting the desired results, can some one please show me the error of my ways?
SERVLET:
import java.io.*;
import java.applet.*;
import java.awt.*;
import java.awt.Graphics;
import java.net.*;
class Test extends Applet{
public void main () {
try
{
URL url = new URL("AppletContext context = getAppletContext();
context.showDocument(url);
}
catch (MalformedURLException e)
{
}
}
}
HTML:
<HTML>
<BODY>
<APPLET CODE="Test.class" HEIGHT=100 WIDTH=100> </APPLET>
</BODY>
</HTML>
SERVLET:
import java.io.*;
import java.applet.*;
import java.awt.*;
import java.awt.Graphics;
import java.net.*;
class Test extends Applet{
public void main () {
try
{
URL url = new URL("AppletContext context = getAppletContext();
context.showDocument(url);
}
catch (MalformedURLException e)
{
}
}
}
HTML:
<HTML>
<BODY>
<APPLET CODE="Test.class" HEIGHT=100 WIDTH=100> </APPLET>
</BODY>
</HTML>