All Examples This Package
java.lang.Object | +----java.awt.Component | +----java.awt.Container | +----java.awt.Panel | +----java.applet.Applet | +----examples.jdbc.mssqlserver4.SocketApplet
This example could fail if there is a firewall between your browser and the given host. If this is the case, look for a proxy server to help you get to the host.
There may also be a problem with the browser's security manager. Normal policy for a security manager is to let your applet only connect to the host from which it loaded. Make sure your applet is loaded from a web server on the same machine that hosts your database. You can also relax security restrictions in certain browsers, such as HotJava.
What should I do if this test fails?
If this test fails, try to telnet directly to the database server. From the command line type:
telnet hostname port
If you cannot telnet there's a chance that your database is not there or there's a firewall between you and your database. If telnet succeeds then you're probably having a problem with the Java security manager.
$ javac -d c:/weblogic/mssqlserver4/classes SocketApplet.java
$ appletviewer SocketApplet.html
public SocketApplet()
public void init()
public void paint(Graphics graphics)
All Examples This Package