October 05, 2005

JSP+MySQL

Recently, my roommate has a project which she will use JSP and MySQL to build her project website. Since I'm not familiar with JSP+MySQL, it was a difficult time for me to figure out how to set it up. After doing few days research and testing, I just make it work! Actually, it was simple.

The environment I had:
Apache 2.0
Tomcat 5.5
MySQL 4.1
Java 1.5

Just need one element - java-mysql connector (Download: MySQL Connector/J)

Extract files from the package, and put mysql-connector-java-3.1.10-bin.jar to %TOMCAT_HOME%/common/lib folder

Basically...that's it. Just need to write the correct JSP code to connect to MySQL. The one I had before, it contained some wrong code so that I couldn't excute it correctly and kept getting errors. Finally, I fixed it, and it worked! Now, I can help my roommate to setup her server and run JSP and MySQL lo!!!! :D

p.s: JavaWorld - a good Java community

No comments: