Win a copy of Murach's Python Programming this week in the Jython/Python forum!
    Bookmark Topic Watch Topic
  • New Topic

Servlet doesn't show data  RSS feed

 
Julio C Moreno
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
  • Report post to moderator
i'm using Class.forName("com.mysql.jdbc.Driver"); for connecting to a mysql database in a servlet , and the class file is on my deploy directory but when i tried to test it , using the browser it only displays the com.mysql.jdbc.Driver and not the data, could be caused for the version of my connector ?, i'm using Apache Tomcat/4.1.31 and mysqlconnector 3.0.7
below is a part of my code :
Class.forName("com.mysql.jdbc.Driver");
prot_db="jdbc";
subprot_db="mysql";
host_db="//localhost";
nom_db="/inventa";
usr_db="julio";
pw_db="one";
theConnection = DriverManager.getConnection(prot_db+":"+subprot_db+":"+host_db+nom_db, usr_db ,pw_db);

any help would be appreciated
 
ramprasad madathil
Ranch Hand
Posts: 489
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Report post to moderator

but when i tried to test it , using the browser it only displays the com.mysql.jdbc.Driver and not the data


Kindly post your test code.

cheers,
ram.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Report post to moderator
I agree, but since this is a duplicate of the thread here, I'm going to close this copy till we have enough information to know what the question is.

Dave
 
It is sorta covered in the JavaRanch Style Guide.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!