Click here to Skip to main content
15,513,571 members
Home / Discussions / Java
   

Java

 
SuggestionRe: how to print the fullstr string to a text file. Pin
Richard Deeming16-Aug-16 3:10
mveRichard Deeming16-Aug-16 3:10 
GeneralRe: how to print the fullstr string to a text file. Pin
Richard MacCutchan16-Aug-16 3:58
mveRichard MacCutchan16-Aug-16 3:58 
Questionneed to print the fullstr string to a textfile Pin
Member 1142765716-Aug-16 1:31
Member 1142765716-Aug-16 1:31 
QuestionDuplicate entry 'VALUE' for key 'PRIMARY' Pin
Django_Untaken13-Aug-16 10:54
Django_Untaken13-Aug-16 10:54 
AnswerRe: Duplicate entry 'VALUE' for key 'PRIMARY' Pin
Patrice T13-Aug-16 17:59
mvePatrice T13-Aug-16 17:59 
GeneralRe: Duplicate entry 'VALUE' for key 'PRIMARY' Pin
Django_Untaken14-Aug-16 4:28
Django_Untaken14-Aug-16 4:28 
GeneralRe: Duplicate entry 'VALUE' for key 'PRIMARY' Pin
Patrice T14-Aug-16 4:39
mvePatrice T14-Aug-16 4:39 
Question[SOLVED] java.lang.ClassNotFoundException: com.mysql.jdbc.Driver Pin
Django_Untaken4-Aug-16 9:35
Django_Untaken4-Aug-16 9:35 
Thanks to richard's pointer...it is solved.

=========================

Hello there. I am trying to connect to mysql database from my basic servlet. As you can see, I reach the servlet but facing this exception when trying to load the MySQL driver.
String JDBC_DRIVER="com.mysql.jdbc.Driver";  
String DB_URL="jdbc:mysql://localhost/testdb";
Class.forName(JDBC_DRIVER); // HERE COMES THE EXCEPTION
I use command line to compile this servlet with all possible JARs.

<br />
javac -classpath ".;path/to/servlet-api.jar;path/to/tomcat-jdbc.jar;path/to/jasper.jar;path/to/mysql-connector-java-5.1.33-bin.jar" FormDbServlet.java<br />


When I try to get values on my HTML page from servlet, I reach the doGet() method but there I get the said exception. What could be wrong? Thanks for any pointer.

modified 5-Aug-16 9:37am.

AnswerRe: java.lang.ClassNotFoundException: com.mysql.jdbc.Driver Pin
Richard MacCutchan4-Aug-16 21:38
mveRichard MacCutchan4-Aug-16 21:38 
QuestionMaven cmd line Tests failing,M aven Test Run Through Eclipse Pass Pin
DLamar123-Aug-16 9:29
DLamar123-Aug-16 9:29 
AnswerRe: Maven cmd line Tests failing,M aven Test Run Through Eclipse Pass Pin
jschell12-Aug-16 11:54
jschell12-Aug-16 11:54 
Questionread and traverse over the TTL file Pin
Eng.Roqaya22-Jul-16 9:12
Eng.Roqaya22-Jul-16 9:12 
AnswerRe: read and traverse over the TTL file Pin
Richard MacCutchan22-Jul-16 22:25
mveRichard MacCutchan22-Jul-16 22:25 
Question.jar to .exe Pin
prateek chauhan19-Jul-16 19:47
prateek chauhan19-Jul-16 19:47 
AnswerRe: .jar to .exe Pin
Richard MacCutchan19-Jul-16 22:48
mveRichard MacCutchan19-Jul-16 22:48 
AnswerRe: .jar to .exe Pin
Afzaal Ahmad Zeeshan22-Jul-16 9:33
mveAfzaal Ahmad Zeeshan22-Jul-16 9:33 
AnswerRe: .jar to .exe Pin
Curry Francis25-Jul-16 2:50
Curry Francis25-Jul-16 2:50 
GeneralRe: .jar to .exe Pin
Richard MacCutchan25-Jul-16 4:16
mveRichard MacCutchan25-Jul-16 4:16 
GeneralRe: .jar to .exe Pin
Curry Francis27-Jul-16 5:01
Curry Francis27-Jul-16 5:01 
GeneralRe: .jar to .exe Pin
Richard MacCutchan27-Jul-16 5:51
mveRichard MacCutchan27-Jul-16 5:51 
GeneralRe: .jar to .exe Pin
jschell12-Aug-16 11:58
jschell12-Aug-16 11:58 
QuestionJava - Iterating through form controls to create Array of Selected Items from Multiple JLists Pin
Member 1141797813-Jul-16 21:31
Member 1141797813-Jul-16 21:31 
AnswerRe: Java - Iterating through form controls to create Array of Selected Items from Multiple JLists Pin
Richard MacCutchan13-Jul-16 22:48
mveRichard MacCutchan13-Jul-16 22:48 
GeneralRe: Java - Iterating through form controls to create Array of Selected Items from Multiple JLists Pin
Member 1141797814-Jul-16 0:14
Member 1141797814-Jul-16 0:14 
GeneralRe: Java - Iterating through form controls to create Array of Selected Items from Multiple JLists Pin
Richard MacCutchan14-Jul-16 0:15
mveRichard MacCutchan14-Jul-16 0:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.