I have mysql-connector-java-5.1.0-bin.jar should I put in classpath of windows environment variable. In web application I read we can keep in lib directory.
or
There are also other ways, but it depends on what servlet container you're running your application in. For example in Apache Tomcat you could also put your libraries in a special lib folder somewhere under the Tomcat installation directory, so that these libraries would be seen by all web applications. (I don't know if this is still possible with Tomcat 7.0, see the Tomcat documentation).