Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Tomcat Users »

RE: JDBC from TagSupport

Hart, Justin

2003-12-16


Ok, so, how does one access this datasource from tagsupport?

Justin

-----Original Message-----
From: Philipp Taprogge [mailto:Philipp.Taprogge@(protected)]
Sent: Tuesday, December 16, 2003 2:24 PM
To: Tomcat Users List
Subject: Re: JDBC from TagSupport


Hi!

Hart, Justin wrote:
> Quick question. I see that one can configure a JDBC datasource in their server.xml file and their web.xml file.
> What does this get you? Every example that I have read tells me
that I need to open a JDBC connection just about
> the same as I would from any other java application.
>
> What is the purpose of setting up a JDBC datasource in these files? Is it only good for userdatabaserealm?

The main advantage is that you can use a connection pool like
jakarta-commons-dbcp which saves you a lot of runtime. The second
advantage is that you can configure the connection parameters like db
URL, username, password and the like on the fly without editing java
sources or redeploying your application.

 Phil


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@(protected)
For additional commands, e-mail: tomcat-user-help@(protected)



©2008 junlu.com - Jax Systems, LLC, U.S.A.