Tomcat comes with a Security Manager which provides some protection against hacking. Of course, it's not a full layer-7 firewall but at least it provides file access and network checking, for free. With this, we can somehow protect our website against defacement, intrusion, and service denial. Now, let's see how to configure it easily.
permission java.net.SocketPermission "10.10.12.12:1521", "connect,resolve";
Also, add permissions for each file that you need to read (such as a properties file) :permission java.io.FilePermission "${catalina.base}${file.separator}conf${file.separator}testread.txt", "read";
Same logic for writing a file :permission java.io.FilePermission "${catalina.base}${file.separator}testwrite.txt", "write";
exec "$PRGDIR"/"$EXECUTABLE" start "$@" -security
Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer