• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Java question

Ok, I'm having issues connecting to my database with my applet. For some reason it is choking on grabbing the driver from the org folder. The folder is in the what I was told was the proper location (same folder as the class & html files). Can anyone point me in the right direction?

Segment of code it's stopping at:
 
Try putting the driver jar file in your sdk folder under jre/lib/ext/

That's where my SQL driver is and it works 🙂
 
#1. Don't use the DriverManager solution for web applications.

#2. I'm gonna guess that you're using tomcat and direct you here. That's a more involved solution than they used to have (uses the mysql connection pool). The old solution used a simpler connection pool from the jakarta commons. You can find documentation for that at roughly the same place in the documentation for tomcat 5.0.x.

#3. Don't use System.out in web applications. It won't kill you if you're just fooling around but a logging package is necessary if you do anything half serious.

#4. Put the driver in the WEB-INF/lib folder or somewhere where your server will pick it up and add it to the class path for all web apps. For tomcat this is common/lib iirc.
 
Back
Top