If you are using multiple databases, I believe you have to set up multiple "Resources" (one for each database). However, you do not have to specify a username/password. When you retrieve your DataSource from the "java:comp/env" namespace, you can use getConnection( username, password). If you don't use multiple users for the database, then this may seem impractical.
You do need a different "Resource" definition for each database though. -Leo http://www.foopan.ath.cx On Thu, 2002-10-17 at 14:19, Mark Lenz wrote: > I'm trying to set up DB Connection Pooling with Tomcat 4.1.12 and MySQL > 4.0.4. Looking at the sample xml configs I noticed that you have to > specify the database, username and password. Is there a way that I can > change the username and database from within my JSP's? Or do I just have > to create different DB contexts in the server.xml file for each database I > want to use and which user I want to connect with? > > Mark Lenz > (920) 832-3523 > [EMAIL PROTECTED] > > The information contained in this electronic mail message is confidential >information and intended only for the use of the individual or entity named above, >and may be privileged. If the reader of this messages is not the intended recipient, >you are hereby notified that any dissemination, distribution or copying of this >communication is strictly prohibited. If you have received this transmission in >error, please contact the sender immediately, delete this material from your >computer and destroy all related paper media. Please note that the documents >transmitted are not intended to be binding until a hard copy has been manually signed >by all parties. > Thank you. -- To unsubscribe, e-mail: <mailto:tomcat-user-unsubscribe@;jakarta.apache.org> For additional commands, e-mail: <mailto:tomcat-user-help@;jakarta.apache.org>