Archive for 'Java'

Comparing Apache Tomcat and TomEE

Comparing Apache Tomcat and TomEE

We downloaded Tomcat 7.0.27 and TomEE 1.0.0 and did a quick comparison. Here are the differences we found. The distributions being compared are apache-tomcat-7.0.27.tar.gz and apache-tomee-1.0.0-webprofile.tar.gz. 1. Tomcat is 7,467 KB. TomEE is 27,702 KB. 2. TomEE catalina.bat/catalina.sh has added the OpenEJB javaagent. 3. TomEE server.xml has the extra listener org.apache.tomee.catalina.ServerListener. 4. Tomcat has a [...]

Java Service Restart Script

Here’s a Bash script that can stop and start a Java service. The file app.jar is an executable jar file.

Handling Exceptions in Spring MVC with Logging

In your Spring servlet.xml, add a HandlerExceptionResolver. “/error/default” is the URL it will go to that will display an error message to the user. warnLogCategory is the logger category. Exceptions will be logged under the warning level and not the error level. The category value can be anything. Here we just set it to the [...]