2. Install Apache Tomcat 9.x by unzip the binary package to a local folder, c:\apache-tomcat-9.0.12.
3. Set up environment in Windows System Environment or a batch file
c:\> SET CATALINA_HOME=c:/apache-tomcat-9.0.12
c:\> SET PATH=%PATH%;%CATALINA_HOME%/bin
4. Start up Tomcat Application Server
c:\apache-tomcat-9.0.12\bin> startup.bat
NOTE: if there is any port numbers already in use, update the port number in %CATALINA_HOME%/conf/server.xml
5. Check logs in %CATALINA_HOME%/logs/
6. Test Tomcat Application Server
In web browser, access http://localhost:8080/, a default Tomcat page (physically in %CATALINA_HOME%\webapps\ROOT\index.jsp) should show up.
7. (Hot) deploy a web application archive package (*.war file)
Copy the .war file (e.g. WebDesignDemo.war) into %CATALINA_HOME%/webapps while the application server is running. The server will unpack the application into a folder with the name of the .war file.
The application context name is normally same as the .war file name. The HTTP URL is http://localhost:8080/<Context Name> (e.g. http://localhost:8080/WebDesignDemo).
Without specifying a page name in the URL, the server will look at the default home page, e.g. index.html or index.jsp in the application folder.
8. Shut down Tomcat Application Server
c:\apache-tomcat-9.0.12\bin> shutdown.bat
Alternatively, just press Ctrl+C in the application server console window
No comments:
Post a Comment