Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私はjsf-2.xとtomcat-7.xを使用しています。サーバーとプロジェクトを同時にJavaクラスを実行するか、最初にJavaクラスを実行します。しかし、私はそれを行う方法がわかりませんか?
私を助けてください
クラスをリスナーとして登録し、クラスにServletContextListenerを実装させてweb.xmlに登録し、Tomcatを再起動する必要があります
この詳細を示す多くのチュートリアルをオンラインで見つけることができます。
tomcatの起動説明はこちら。
起動プロセスは、Tomcat コードを変更したり、server.xml 構成ファイルに登録される独自の LifecycleListeners を実装したりすることによって、さまざまな方法でカスタマイズできます。