1. To use tomcat, you must first install java and configure the java environment variables. Please refer to Baidu: java environment variables.
2. Download tomcat: You can select the version you need to download at https://tomcat.apache.org/download-70.cgi. Download and unzip the current folder,
3. Configure tomcat environment variables
1, create a new variable name: CATALINA_BASE, variable value: C:\tomcat
2, create a new variable Name: CATALINA_HOME, variable value: C:\tomcat
3, open PATH, add variable value: �TALINA_HOME%\lib;�TALINA_HOME%\bin
4. Start Tomcat service
Two methods:
1. Method 1: Enter the command: startup under the CMD command. The following dialog box appears, indicating that the service is started successfully.
2. Find bin/startup.bat in the decompressed tomcat folder and start it.
5. Test tomcat
Open the browser, enter http://localhost:8080 in the address bar and press Enter. If you see a JSP page that comes with Tomcat, it means your JDK and Tomcat have been built successfully.
Note: If the oracle database is installed or about to be installed on the computer, please find
<Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" />
in conf/server.xml under the tomcat folder and change "8080" to another port number. Such as "8989". Because the default port number of tomcat and Oracle is "8080", in order to avoid conflicts in the later entries, please be sure to change it. This situation is mostly encountered only with tomcat Oracle, so remember!
The above is the detailed content of How to use tomcat?. For more information, please follow other related articles on the PHP Chinese website!