aspose file tools*
The moose likes Tomcat and the fly likes tomcat connection pooling Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "tomcat connection pooling" Watch "tomcat connection pooling" New topic
Author

tomcat connection pooling

pooja jain
greenhorn
Ranch Hand

Joined: Jan 12, 2005
Posts: 213
i am using mysql db.

here is what i am doing:

1. following entries in server.xml:



2. folling code in my context listener:


when i start the server, i get following exception:



i follow following link: http://www.onjava.com/pub/a/onjava/2006/04/19/database-connection-pooling-with-tomcat.html?page=2

please help.


:d
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Where did you put your JDBC driver?


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Also, instead of using the onJava article, why aren't you using the current Tomct documentation for the version of Tomcat that you're running?

I don't know how old that article is but the Tomcat documentation has advised against putting <Context .../> entries in server.xml since version 5.0.
pooja jain
greenhorn
Ranch Hand

Joined: Jan 12, 2005
Posts: 213
Originally posted by Ben Souther:
Where did you put your JDBC driver?


i keep it (mysql.jar) into lib folder of tomcat.
pooja jain
greenhorn
Ranch Hand

Joined: Jan 12, 2005
Posts: 213
Originally posted by Ben Souther:
Where did you put your JDBC driver?


i keep it (mysql.jar) into lib folder of tomcat.
pooja jain
greenhorn
Ranch Hand

Joined: Jan 12, 2005
Posts: 213
Originally posted by Ben Souther:
Also, instead of using the onJava article, why aren't you using the current Tomct documentation for the version of Tomcat that you're running?

I don't know how old that article is but the Tomcat documentation has advised against putting <Context .../> entries in server.xml since version 5.0.


okay. its mentioned. and it can be mentioned at following places:



1. context.xml already have a context element. should i replace it?
2. in 2nd and 3rd option, there is no engine name and host name folder in my system.
3. in 4th, i dont have META-INF folder in my application.
4. in 5th, isn't it modifying host tag is equivalent to modifying context tag? both are common for all application deployed on this tomcat.
pooja jain
greenhorn
Ranch Hand

Joined: Jan 12, 2005
Posts: 213

inside a Host element in the main conf/server.xml


now i placed context tag inside host tag of server.xml file but still the same error.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

My point was that you'd be better off using the documentation on the Tomcat site; especially if you use the one that is matched to the exact version of Tomcat that you're using.

If something changed since that magazine article was written, it will throw you off.
pooja jain
greenhorn
Ranch Hand

Joined: Jan 12, 2005
Posts: 213
Originally posted by Ben Souther:
My point was that you'd be better off using the documentation on the Tomcat site; especially if you use the one that is matched to the exact version of Tomcat that you're using.

If something changed since that magazine article was written, it will throw you off.


i understood. now i am referring tomcat site but still the same error.
Pushkal Mishra
Greenhorn

Joined: Sep 17, 2003
Posts: 10
Pooja,

I take it that you have also modified the necessary element in web.xml (<resource-ref>).

Thanks,
Pushkal

Originally posted by pooja jain:


okay. its mentioned. and it can be mentioned at following places:



1. context.xml already have a context element. should i replace it?
2. in 2nd and 3rd option, there is no engine name and host name folder in my system.
3. in 4th, i dont have META-INF folder in my application.
4. in 5th, isn't it modifying host tag is equivalent to modifying context tag? both are common for all application deployed on this tomcat.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: tomcat connection pooling