Deploying WAR Files in Tomcat 7
Once you have copied a WAR file into the webapps directory of Tomcat, it will be automatically deployed. You do not need to open the WAR file in a browser to initiate deployment.
Accessing the Deployed Application
After deployment, you can access your application by navigating to the following URL in a browser:
http://localhost:8080/sample
where "sample" is the name of your WAR file without the ".war" extension.
Automatic Deployment Process
By default, Tomcat 7 automatically deploys and redeploys WAR files located in the webapps directory. When a new WAR file is copied or overwritten, Tomcat extracts the contents into a corresponding folder within the webapps directory.
Troubleshooting
If your application does not open properly, you can check the Tomcat logs (typically located in the "logs" subdirectory of the Tomcat installation directory) for any deployment errors. The "catalina.out" log file is a good place to start.
Atas ialah kandungan terperinci Bagaimanakah saya boleh mengakses fail WAR yang digunakan dalam Tomcat 7?. Untuk maklumat lanjut, sila ikut artikel berkaitan lain di laman web China PHP!