Slow startup on Tomcat 7.0.57 because of SecureRandom

I faced same issue of tomcat being too slow to start. I followed this article on DigitalOcean and installed haveged instead of using urandom. haveged is a solution which will not compromise on security. haveged allows generating randomness based on variations in code execution time on a processor. Since it’s nearly impossible for one piece … Read more

How to start Tomcat with output on console in Linux? [closed]

You’re looking for tomcat/bin/catalina.sh run instead of tomcat/bin/startup.sh; tail -f tomcat/logs/catalina.out Tomcat stays in foreground this way (first option). If you want to shut it down, Ctrl-C in your console window will do the trick. If you choose the second option, tomcat will run in background, while tail will run in foreground, but you’ll have … Read more

Tomcat7 bind to port 80 fails in Ubuntu 14.04LTS

Following works: apt-get install authbind First, set AUTHBIND=yes in /etc/default/tomcat7 file sudo touch /etc/authbind/byport/80 sudo chmod 500 /etc/authbind/byport/80 sudo chown tomcat7 /etc/authbind/byport/80 There was a reference URL here, but the website has been hacked (marked as unsafe in Edge, and Chrome prompts me to install a browser extension).

How do I increase memory on Tomcat 7 when running as a Windows Service?

Assuming that you’ve downloaded and installed Tomcat as Windows Service Installer exe file from the Tomcat homepage, then check the Apache feather icon in the systray (or when absent, run Monitor Tomcat from the start menu). Doubleclick the feather icon and go to the Java tab. There you can configure the memory. Restart the service … Read more

What to do with annotations after setting metadata-complete=”true” (which resolved slow Tomcat 7 start-up)?

The slow startup is caused because every single class file in every single JAR file in /WEB-INF/lib is also scanned for Servlet 3.0 specific annotations. You apparently have a lot of (large) JAR files in /WEB-INF/lib. The metadata-complete=”true” indicates that the JAR files in /WEB-INF/lib doesn’t need to be scanned for Servlet 3.0 specific annotations, … Read more

How to run Tomcat 7 using Maven 2 Tomcat plugin?

This works for me: http://tomcat.apache.org/maven-plugin-2.1/ With this plugin config: <plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.1</version> <configuration> <path>/</path> </configuration> </plugin> And running with mvn clean install tomcat7:run (Please note that tomcat7:run, not tomcat:run.) Plugin documentation is here: http://tomcat.apache.org/maven-plugin-2.1/tomcat7-maven-plugin/plugin-info.html For example, the default value of additionalConfigFilesDir is ${basedir}/src/main/tomcatconf, so if you put your configs into this directory it will … Read more