Skip to main content

Posts

Showing posts with the label Tomcat

Connection Pool Configuration Using DBCP

Connection pool configuration, for most of the web applications with data base interaction, is a common process. Either small or big, its always suggested to have connection pool configured for better performance. If your JDBC or DAO code is creating data base connection for each call, it results a lot of overhead and reduces your application performance. Using connection pool will improve application performance a lot. If you are deploying your web application in Application Servers like Weblogic, Webspere, etc. they will allow you to configure connection pool and maintain them for you. But if you are opting for Web Server like Tomcat , which is the most common case when you go for shared hosting services, then you have to depend on resources like DBCP [Data Base Connection Pool] for connection pooling. Its one of the best options available for connection pooling. By configuring connection pool in Tomcat will relieve lot of responsibilities from your application. We let Tomcat cr...

Hosting Multiple Domains In Tomcat

Tomcat allows us to host multiple domains in one instance, using multiple ' Host ' tags. In this article I will explain how to do it on Tomcat. This is very simple configuration using ' Host ' tags in your server.xml . A novice can also understand this configuration very easily. Before going into the details of the configuration first lets have a look at the ' Host ' tag, ' Context ' tag and ' Alias ' tags first. <Host name="domain1" appBase="[application base]" autoDeploy="[true/false]" unpackWARs="[true/false]"> <Alias>...</Alias> <Context path="" docBase="" reloadable="[true/false]"/> </Host> First lets have a look at ' Alias ' tag. This tag is used to provide aliases for your actual domain. For example you have a domain called 'domain1.com', and you want to run the same application for 'www.do...