Archive for the ‘Java’ Category

How to set an application name in the Tomcat Manager

Tuesday, October 14th, 2014

Web.xml in the WAR should have a tag <display-name>

Using Spring StopWatch to measure performance of your server code

Tuesday, October 14th, 2014

import org.springframework.util.StopWatch;
//Very 1st statement in controller method :

StopWatch stopwatch = new Stopwatch(“some name here”);
stopwatch.start(“snippet 1″);

//code snippet 1 here

stopwatch.stop();

stopwatch.start(“snippet 2″);

//code snippet 2 here

stopwatch.stop();


logger.debug(stopwatch.prettyPrint());