Posts

Showing posts from October, 2014

How to Print Stack Trace of an Exception using Log4j

Log4j exception FAQ: "How do I print the stack trace of an exception using Log4j or Commons Logging?"

Difference Between utf8_general_ci and utf8_unicode_ci

Between utf8_general_ci and utf8_unicode_ci, are there any differences in terms of performance?

Running Tomcat on Port 80

By default Tomcat's HTTP connector listens on port 8080. Changing to port 80 in Linux environment can be quite a tricky issue, since by default listening on any port under 1024 require a privileged user, and for security considerations it is not recommended to run Tomcat with elevated permissions. This article discusses how to use authbind to achieve this; it also describes the way all this configuration can be automated for the sake of the creation of a script which can be used to initialize a freshly installed Linux instance. This is especially advantageous on Amazon EC2, where we can use this init-script to initialize a fresh instance just launched from an AMI; and indeed, for the sake of this article Amazon's "Amazon Linux Image 1.0" was used for testing. Please note that this is a CentOS 6-based linux distribution, for other distributions there are slight changes, like replacing "sudo yum install tomcat7" with "sudo apt-get install tomcat7" o…

Setup Jenkins with Bitbucket on EC2

Jenkins CI is the leading open-source continuous integration server.