Hello Team,
I wrote a little applet application which accesses a database(oracle),It run fine within netbean IDE but if I try
to run it on a browser(Html file) it does not connect to database. The applet is organized in a package(appletform) of two
classes(appletform.java and cod.java).
2. Also, How can I deploy this application to tomcat on my system using netbean IDE so that it can be accessed
from a browser.
my html file is show below
=============================
<HTML>
<HEAD>
<TITLE>Applet HTML Page</TITLE>
</HEAD>
<BODY>
<!--
*** GENERATED applet HTML launcher - DO NOT EDIT IN 'BUILD' FOLDER ***
If you need to modify this HTML
launcher file (e.g., to add applet parameters),
copy it to where your applet class is found in the SRC folder. If
you do this,
the IDE will use it when you run or debug the applet.
Tip: To exclude an HTML launcher from the JAR
file, use exclusion filters in
the Packaging page in the Project Properties dialog.
For more information see the
online help.
-->
<H3><HR WIDTH="100%">Applet HTML Page<HR WIDTH="100%"></H3>
<P>
<APPLET codebase="classes" code="appletform/appletForm.class"
archive ="lib/ojdbc14.jar,appletform/appletForm.jar"
width=700 height=400></APPLET>
</P>
<HR WIDTH="100%"><FONT SIZE=-1><I>Generated by NetBeans IDE</I></FONT>
</BODY>
</HTML>
++++++++++++++++++++++++
ERROR MESSAGE
++++++++++++++++++++++++++
java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
at sun.plugin2.applet.Applet2ClassLoader.findClass(Un known Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(U nknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Un known Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Un known Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at appletform.cod.connect(cod.java:116)
at appletform.appletForm$1.run(appletForm.java:40)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
java.lang.InterruptedException
at java.lang.Object.wait(Native Method)
at java.lang.Object.wait(Object.java:485)
at com.passlogix.vgo.ho.EventDispatchRunner.runAndWai t(EventDispatchRunner.java:83)
at com.passlogix.vgo.ho.EventDispatchRunner.runAndWai t(EventDispatchRunner.java:48)
at com.passlogix.vgo.ho.WindowScanner.run(WindowScann er.java:485)
java.lang.NullPointerException
at appletform.cod.isDatabaseUp(cod.java:231)
at appletform.appletForm.login(appletForm.java:766)
at appletform.appletForm.cmdLoginActionPerformed(appl etForm.java:653)
at appletform.appletForm.access$100(appletForm.java:2 8)
at appletform.appletForm$2.actionPerformed(appletForm .java:148)
at javax.swing.AbstractButton.fireActionPerformed(Unk nown Source)
at javax.swing.AbstractButton$Handler.actionPerformed (Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed (Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseRe leased(Unknown Source)
known Source)
at java.security.AccessControlContext$1.doIntersectio nPrivilege(Unknown So
Thanks as your help will be highly apprerciated.