You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Apache Wiki <wi...@apache.org> on 2013/02/03 00:04:01 UTC

[Tomcat Wiki] Update of "UsingDataSources" by KonstantinKolinko

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Tomcat Wiki" for change notification.

The "UsingDataSources" page has been changed by KonstantinKolinko:
http://wiki.apache.org/tomcat/UsingDataSources?action=diff&rev1=5&rev2=6

Comment:
Correct path and Tomcat version. Add category link.

  The usual procedure requires the application developer to set up a !DataSource in the web application server, specifying the driver class, JDBC URL (connect string), username, password, and various pooling options. Then, the developer must reference the !DataSource in his application's web.xml configuration file, and then access it properly in his servlet or JSP. Particularly during development, setting all of this
  up is tedious and error-prone.
  
- With Tomcat 5.5, the process is vastly simplified. Tomcat allows you to configure !DataSources for your J2EE web application
+ With Tomcat the process is vastly simplified. Tomcat allows you to configure !DataSources for your J2EE web application
  in a context.xml file that is stored in your web application project. You don't have to mess with configuring the !DataSource
  separately in the Tomcat server.xml, or referencing it in your application's web.xml file. Here's how:
  
  === Install the JDBC Driver ===
  
- Install the .jar file(s) containing the JDBC driver in Tomcat's common/lib folder. You do not need to put them in your application's WEB-INF/lib folder. When working with J2EE !DataSources, the web application server manages connections for your application.
+ Install the .jar file(s) containing the JDBC driver in Tomcat's `$CATALINA_BASE/lib` folder. You do not need to put them in your application's `WEB-INF/lib` folder. When working with J2EE !DataSources, the web application server manages connections for your application.
  
  === Create META-INF/context.xml ===
  
@@ -76, +76 @@

  
  === Please Note ===
  
- This technique is Tomcat-specific. If you deploy your web application to another application server (or even an older version of Tomcat), you will need to configure the database according to your application server's documentation, and reference it in your application's web.xml. 
+ This technique is Tomcat-specific. If you deploy your web application to another application server, you will need to configure the database according to your application server's documentation, and reference it in your application's web.xml. 
  
+ ----
+ [[CategoryFAQ]]
+ 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org