I. Preface
Tomcat is a good choice for beginners to execute JSP and Servlet ,. Tomcat is a product of the Apache organization, and sun's support for it is also quite good.
Ii. Download and install
JAVA official site: jakarta.apache.org, which is also widely used in China.
You can download this link: http://jakarta.apache.org/builds/atat/release/. what I download is tomcat32b4.
After the download, decompress the package to a directory. Here I will use F: omcat32b4 as an example.
Iii. Configuration
Right-click my computer on the desktop)
Advanced
Environment Variable
Go to "system variables" ---> "new"
Enter JAVA_HOME in the variable name and F: JDK13 in the variable value, and then click OK;
Go to "system variables" ---> "new"
Enter TOMCAT_HOME in the variable name and F: omcat32b4 in the variable value, and then confirm;
Okay. After the configuration is complete, the environment variable will be valid only after the computer is restarted.
Note that other Tomcat settings can be left unchanged if not necessary. Here I will talk about the simplest and most feasible method. If you are not sure about your changes, we recommend that you do not change it.
Iv. Test
(1) start tomcat:
Run startup. bat under F: omcat32b4in and a Dos window appears.
(2) browsing
Enter http: // localhost: 8080/in the browser to check the effect. (the default Tomcat port is 8080. You can change it without conflict ), is it possible to see a cute kitten (in fact, I personally think, whether in color or look, it is more like a tiger)
(3) Run
On this page, JSP Examples and Servlet Examples are available. Now, test and run them on your own.
(4) Exit tomcat
There is a shutdown under F: omcat32b4in. bat, run it, it will close the Dos window (if you insist on closing the DOS window directly, but since there is this shutdown. bat, there should be reasons for its existence ). (Source: viphot.com)