Author | Message |
---|---|
se1k1h1mawar1
Posts: 121
|
Posted 10:40 Nov 15, 2014 |
I have mysql-connector-java-5.1.33\mysql-connector-java-5.1.33-bin.jar in apache-tomcat-7.0.55\lib\, and it shows up on my Eclipse Project Explorer under the Dynamic Web Project folder where I have my HelloJDBC.java which is from our course website (Please see the attachment), but when I run the servlet, I get 500 error (I also see the Driver.class under com.mysql.jdbc package under mysql-connector-java-5.1.33-bin.jar):
Could anybody please point out what I am doing wrong and some things I could try to fix the problem? -Kae Last edited by se1k1h1mawar1 at
10:49 Nov 15, 2014.
|
cysun
Posts: 2935
|
Posted 12:07 Nov 15, 2014 |
Is the jar file directly under Tomcat's lib folder or is it under a subfolder /mysql-connector-java-5.1.33 under /lib? It needs to be directly under /lib. |
se1k1h1mawar1
Posts: 121
|
Posted 12:29 Nov 15, 2014 |
If I understand it correctly, it is situated directly under /lib (Please see the attached). |
cysun
Posts: 2935
|
Posted 12:32 Nov 15, 2014 |
It's not. You need to move the jar file out of the mysql-connector-java-5.1.33 folder and put it directly under /lib like the other jar files. In fact I'm surprised that your JSTL worked because it looks like your JSTL jar files are also under a subfolder. |
se1k1h1mawar1
Posts: 121
|
Posted 12:33 Nov 15, 2014 |
Oh, I'm sorry, it WAS under the subdirectly. Thank you. |
se1k1h1mawar1
Posts: 121
|
Posted 12:37 Nov 15, 2014 |
And now it is fixed. -Kae |