Online education portals like Udacity and Coursera are really changing the world of remote learning in significant ways. By making free and high quality education accessible to a global audience, these platforms are opening up undreamt of possibilities for communities around the world to improve, grow, and prosper in the digital economy of the 21st century. Education at top tier colleges and universities has traditionally been a social and economic privilege, but now anyone can join in the learning revolution by sitting in virtual classrooms with the world’s best and brightest educators. Whether this involves learning how to code and build smart phone apps, or starting up a new business, or learning about public health literacy, the sky is the limit of what’s now possible.

Everything about Web and Network Monitoring

Major difference between Tomcat 5.0 and Tomcat 5.5

The Apache Jakarta Tomcat is the most widely opensource web servlet/jsp container used nowdays. As more and more new versions are available, it is necessary to mention some core differences in syntax or format of configuration files between these versions. In this article I would like to show one valuable difference between Tomcat 5.0.x and Tomcat 5.5.x. When deploying an application into web server some properties should be specified in server.xml file which is common for all applications deployed on the same web server or in the context.xml file specific to each application. In the version Tomcat 5.0.x the configuration file should be consisted of a list of parameters of a following format:

<Resource name="jdbc/TestDB"
auth="Container"
type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/TestDB">
<parameter>
<name>username</name>
<value>javauser</value>
</parameter>
<parameter>
<name>password</name>
<value>javauser</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>com.mysql.jdbc.Driver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:mysql://localhost:3306/javatest?autoReconnect=true</value>
</parameter>
</ResourceParams>

In this example we’re specifing the connection properties for MySQL database as a parameters. In versions 5.0.x this will work without any problems, but if you try to change your version of Tomcat and try to use the same configuration files you will fail. The problem is that in versions 5.5.x the propeties should be specified as attributes of Resource element as in the following example:

<Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource"
username="javauser" password="javadude" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/javatest?autoReconnect=true"/>

So when upgrading your Tomcat version take care of changing the configuration files to reflect the syntax and format of the new version.

About Mikayel Vardanyan

Comments are closed.