Eclipse Lomboz environment development J2EE project, I have the project name Deepsoft, the web moudle name MYAPPSDeploy will automatically establish the following directory in Tomcat to create a release directory D: / Tomcat5 | ----- / WebApps | ----- - / myApps ---------------------------------------- this directory is automatically generated of. | ------ / Web-INF (1) For clarity and easy management, we configure the .xml file for our database connection pool. D: / tomcat5 | ----- / conf | ------- / catalina This directory will now find root, manager, balance and other directories, open you will find the virtual directory comes with Tomcat Profile. At this time we can build a .xml file for your own project. Note: The file name is recommended to use the project name. I have the project name is deepsoft.xml so I have the configuration file as follows: Deepsoft.xml Xml version = '1.0' encoding = 'uTF-8'?>
Context> For the Oracle database, just change the corresponding URL, DriverClassName. At the same time, it is guaranteed that you have installed the necessary drivers, Oracle's Calss111.jar, and SQL Server's three driver files to Tomcat5 / Common / Lib Directory (2) and then play D: / Tomcat5 / WebApps / MyApps / Web-INF / Web.xml, add the following statement: (Note To add it before web-app>)
NOTICE: NO THIS SENTENCE, You Will Find A Error of "Can't Bound Jndi Name" (3) Notice !!!!!! Configuration Complete Test Page is built as follows.jsp
<% @ page import = "javax.naming.context"%> <% @ page import = "javax.sql.datasource"%> <% @ Page Import = "javax.naming.initialcontext"%> <% @ Page Import = "java.sql. *"%>