Results 1 to 6 of 6
- 01-20-2011, 11:19 PM #1
Member
- Join Date
- Mar 2010
- Posts
- 12
- Rep Power
- 0
applet does not connects to database in browser
Hello programmers,
could someone point me where to start for this problem:
created applet using NetBeans. Part of the applet is to connect to database. When I run it on NetBeans - works fine, but when open .html file (auto created by NetBeans in build folder) connection does not happen. Everything works but does not connect. I am working at the moment on localhost.
Code in html:
<APPLET codebase="classes" code="nwt/name_applet.class" width=650 height=700></APPLET>
Where do start to look for problem? Please help.
Thank you.
- 01-21-2011, 12:03 AM #2
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,609
- Rep Power
- 5
View the console output. I know firefox has an option to view the java console and view println's or any exceptions being thrown (My guess is that a SecurityException is being thrown, in which case you need to sign your applet)
- 01-25-2011, 03:24 PM #3
Member
- Join Date
- Mar 2010
- Posts
- 12
- Rep Power
- 0
thanks doWhile.
I did what you said, console gave me an error
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
How do I fix this? Why loading from NetBeans everyhing works fine?
please advise.
- 01-25-2011, 03:30 PM #4
Member
- Join Date
- Mar 2010
- Posts
- 12
- Rep Power
- 0
+ displayed error:
java.sql.SQLException: No suitable driver found for jdbc:mysql://localhost/....
- 01-25-2011, 06:06 PM #5
Moderator
- Join Date
- Jul 2010
- Location
- California
- Posts
- 1,609
- Rep Power
- 5
You need to add the driver to your classpath. There are probably hundreds of posts here that describe how to do this so rather than reproduce all that info I recommend you do a search of the forums. For example, here is a recent post that discusses this: Problem loading JDBC SQL driver.
This situation may be a bit different because it is an applet, you need to add the jar to the appropriate server location and add it to the archive tag of the applet
- 01-25-2011, 06:51 PM #6
Member
- Join Date
- Mar 2010
- Posts
- 12
- Rep Power
- 0
Similar Threads
-
No sound when applet is in browser
By Ambergahill in forum New To JavaReplies: 5Last Post: 11-21-2010, 06:40 AM -
Problem Java Applet Button Connects to a Server
By francojava1 in forum Java AppletsReplies: 3Last Post: 09-09-2010, 07:48 PM -
Login page which connects to database that verifies user
By Neutrino in forum JDBCReplies: 1Last Post: 03-15-2010, 01:39 AM -
Applet with Images in Browser
By baron in forum EclipseReplies: 0Last Post: 09-20-2009, 10:06 PM -
applet won't run in browser...
By shwein in forum Java AppletsReplies: 6Last Post: 10-17-2008, 06:24 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks