NOTICE

Adfly Links not working Find Direct Links HERE

Error in connecting JSP with MYSQL database table Resolved !

Ok Here the Solution to connect MYSQL with JSP above given program

First open Netbeans

Click on SERVICES
then Right Click on the server like for me its "Apache Tomcat" then select __Edit Server.XML__


Add below Line at line 39 i think between GlobalNamingResources tags

    <Resource name="jdbc/DATABASENAME" type="javax.sql.DataSource" maxActive="4" maxIdle="2" username="root" password="" maxWait="23000" driverClassName="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3306/DATABASENAME"></Resource>

and Save it

Now select Projects

then right Click on the project you are working and select Properties

Now in Libraries Under Compile tab click Add JAR

Then locate your "mysql-connector-java-5.1.18-bin.jar" Download it from Here if you don't have

then click ok

then restart server 

then Its Done !

0 comments :

Feel free to leave comment if you like above widget, have any questions or just say Hi! :)