Tomcat Deploy Web App takes long time

Observed that deployment of WAR files was taking a long time.

On searching for info came to know it could be because of the bug

http://bugs.java.com/bugdatabase/view_bug.do?bug_id=4705093

The solution was to add the following line in $CATALINA_HOME/bin/setenv.sh file (create one if it is not there) [ java.awt.headless is not associated with the issue]

export JAVA_OPTS="$JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -Djava.awt.headless=true"