Why should we do with the database connection pool? Ground to online search, the basic principles of a lot of code is a lot, because of his right asp.net Bijiao Shu, java is started, a little health, so much trouble to write their own, so that a web search, there are many open-source open-source database connection pool, its own recommended for BoneCP;
He had just started to write jsp, Therefore, the use of the IDE is NetBeans, which IDE to use the same fact, as long as you put these as Notepad or editplus on usage are similar, but in fact, or is it a bit different.
Their own development environment:
2. tomcat 6.0.20 (zip version, do not use the exe version, because that version does not have much control over the script)
3. NetBeans 6.7.1
4. The system classpath is set with jdk6.0 and tomcat's lib
But before then: tomcat for each Web application (Web site) of the WEB-INF in this folder, and classes in the lib folder in the Web application on the staged position, therefore, to import a library, just the corresponding jar file into WEB-INF location of the lib can call, do not need to set up in the WEB-INF/web.xml inside. (In fact, here seen as the production environment)
2. Download package
Note: Because I have here is only jsp development environment, does not contain any of the java framework, therefore, can not directly use the jar, the corresponding need to import the jar referenced jar
Note that we must import these two packages,
(Official incidentally mentioned a moment, but placed in obvious places
You will also need SLF4J and Google Collections library as described in the requirements page.), So I walked a lot of detours to see your best to compile their own process to see what is wrong will be reported!
3. Import Package Here we must mention the next, NetBeans default staged (you can say classpath) does not include WEB-INF/lib and WEB-INF/classes
So, if you direct this directly dumped into these positions of several packages, compile the above it will still Baocuo WEB-INF/lib placed on the number of packets, after further action needs to be done, right click on the above picture of the library, Click Add jar, and then select those few jar, that is to tell NetBeans, classpath to include in the file path of this jar. This can be found at compile time the appropriate jar.
Note that the system classpath variable, IDE's classpath, the deployment of Web applications running on classpath, when the difference between the three
4. As usual to write the database connection, examples of official there, actually, written and connections are similar, just java internal mode of operation has changed nothing!