Configure Tomcat4.1.24 in jbuilder
1. There is a THIRDPARTY / JAKARTA-TOMCAT-4.1.24-Le-JDK14 directory in the JBuilder9 program directory, which is the Tomcat4.1 server comes with jbuilder 2. The database connection pool requires Commons-DBCP-1.1, Commons-Pool- 1.1 These two JAR packs, Toncat under JB has no comes with this two JAR package, which puts their COPY to the JBuilder9 program directory through the ThirdParty / Jakarta-Tomcat-4.1.24-Le-JDK14 // Common / lib3. Take JDBC Driver COPY to JBuilder9 Program Directory THIRDPARTY / JAKARTA-TOMCAT-4.1.24-Le-JDK14 // Common / LIB 4. Your Project has Tomcat's directory, you will see conf, WebApp, and Work three after entering Folder. Take a closer look at the configuration file inside the conf of a WebApp, modify the jb *********. XML (**** is a virtual path name), and the comment below is removed Then configure the database connection pool 5. My JB ****. XML example XML Version = " 1.0 "Encoding =" UTF-8 "?>
parameter>
<%
CONTEXT CTX = NULL; try {ctx = new initialContext (); DataSource DS = (DataSource) CTX.lookup ("Java: Comp / Env / JDBC / ConnectDB"); conn = ds.getConnection ();
} Finally {try {if (ctx! = Null) {ctx.close ();}} catch (namingexception) {}}
%>