J2EEアプリケーションはSystem.exit()を使用し、コンテナもシャットダウンします。
ウェブ・アプリケーションがアプリケーション・コンテナをシャットダウンしようとするのは、決して良い考え ではありません。アプリケーションをシャットダウンできる機能へのアクセスは、サービス拒否(DoS)攻撃の手段です。
A J2EE application uses System.exit(), which also shuts down its container.
It is never a good idea for a web application to attempt to shut down the application container. Access to a function that can shut down the application is an avenue for Denial of Service (DoS) attacks.