Click here to Skip to main content
15,885,366 members
Home / Discussions / Java
   

Java

 
SuggestionRe: how to print the fullstr string to a text file. Pin
Richard Deeming16-Aug-16 2:10
mveRichard Deeming16-Aug-16 2:10 
GeneralRe: how to print the fullstr string to a text file. Pin
Richard MacCutchan16-Aug-16 2:58
mveRichard MacCutchan16-Aug-16 2:58 
Questionneed to print the fullstr string to a textfile Pin
Member 1142765716-Aug-16 0:31
Member 1142765716-Aug-16 0:31 
QuestionDuplicate entry 'VALUE' for key 'PRIMARY' Pin
Django_Untaken13-Aug-16 9:54
Django_Untaken13-Aug-16 9:54 
AnswerRe: Duplicate entry 'VALUE' for key 'PRIMARY' Pin
Patrice T13-Aug-16 16:59
mvePatrice T13-Aug-16 16:59 
GeneralRe: Duplicate entry 'VALUE' for key 'PRIMARY' Pin
Django_Untaken14-Aug-16 3:28
Django_Untaken14-Aug-16 3:28 
GeneralRe: Duplicate entry 'VALUE' for key 'PRIMARY' Pin
Patrice T14-Aug-16 3:39
mvePatrice T14-Aug-16 3:39 
Question[SOLVED] java.lang.ClassNotFoundException: com.mysql.jdbc.Driver Pin
Django_Untaken4-Aug-16 8:35
Django_Untaken4-Aug-16 8: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 20:38
mveRichard MacCutchan4-Aug-16 20:38 
QuestionMaven cmd line Tests failing,M aven Test Run Through Eclipse Pass Pin
DLamar123-Aug-16 8:29
DLamar123-Aug-16 8:29 
AnswerRe: Maven cmd line Tests failing,M aven Test Run Through Eclipse Pass Pin
jschell12-Aug-16 10:54
jschell12-Aug-16 10:54 
Questionread and traverse over the TTL file Pin
Eng.Roqaya22-Jul-16 8:12
Eng.Roqaya22-Jul-16 8:12 
AnswerRe: read and traverse over the TTL file Pin
Richard MacCutchan22-Jul-16 21:25
mveRichard MacCutchan22-Jul-16 21:25 
Question.jar to .exe Pin
prateek chauhan19-Jul-16 18:47
prateek chauhan19-Jul-16 18:47 
AnswerRe: .jar to .exe Pin
Richard MacCutchan19-Jul-16 21:48
mveRichard MacCutchan19-Jul-16 21:48 
AnswerRe: .jar to .exe Pin
Afzaal Ahmad Zeeshan22-Jul-16 8:33
professionalAfzaal Ahmad Zeeshan22-Jul-16 8:33 
AnswerRe: .jar to .exe Pin
Curry Francis25-Jul-16 1:50
Curry Francis25-Jul-16 1:50 
GeneralRe: .jar to .exe Pin
Richard MacCutchan25-Jul-16 3:16
mveRichard MacCutchan25-Jul-16 3:16 
GeneralRe: .jar to .exe Pin
Curry Francis27-Jul-16 4:01
Curry Francis27-Jul-16 4:01 
GeneralRe: .jar to .exe Pin
Richard MacCutchan27-Jul-16 4:51
mveRichard MacCutchan27-Jul-16 4:51 
GeneralRe: .jar to .exe Pin
jschell12-Aug-16 10:58
jschell12-Aug-16 10:58 
QuestionJava - Iterating through form controls to create Array of Selected Items from Multiple JLists Pin
Member 1141797813-Jul-16 20:31
Member 1141797813-Jul-16 20:31 
AnswerRe: Java - Iterating through form controls to create Array of Selected Items from Multiple JLists Pin
Richard MacCutchan13-Jul-16 21:48
mveRichard MacCutchan13-Jul-16 21:48 
GeneralRe: Java - Iterating through form controls to create Array of Selected Items from Multiple JLists Pin
Member 1141797813-Jul-16 23:14
Member 1141797813-Jul-16 23:14 
GeneralRe: Java - Iterating through form controls to create Array of Selected Items from Multiple JLists Pin
Richard MacCutchan13-Jul-16 23:15
mveRichard MacCutchan13-Jul-16 23: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.