"Tomcat is a core project in the Apache Software Foundation (Apache Software Foundation) Jakarta Project, developed by Apache, Sun, and other companies and individuals. With Sun's involvement and support, the latest servlet and JSP specifications are always reflected in Tomcat, and Tomcat 5 supports the latest servlet 2.4 and JSP 2.0 specifications. Because of the advanced Tomcat technology, stable performance, and free, so deeply loved by Java enthusiasts and have been recognized by some software developers, become the most popular Web application server. "--Baidu Encyclopedia
0. Install Eclipse
1, install tomcat (download the decompression version of the direct decompression)
Tomcat directory structure:/bin to store Startup (Startup.bat) and Close (shutdown.dat) script files
/conf stores various configuration files, including Server.xml (port. ), Tomcat-user.xml, and Web. xml
/lib Store the jar files that the server and all Web applications need to access;
2. Configuring Tomcat's environment variables
Variable name: Catalina_home variable Value: Tomcat's installation path
In the browser input http://localhost:8080/, the ability to open the Tomcat welcome interface indicates that the installation was successful;
3, open Eclipse, open window-preferences;
Select Server-runtime Environment
Click Add, select the version of Tomcat to download, next, select the Tomcat installation path;
4. The first JSP program
Create a new dynamic Web Project;
Create a new JSP File under the webcontent of the new Dynamic Web project (remember to webcontent );
Hello World;
Start the server (in Window-show view-other, click Server, point to the top right corner of the green Start button);
Finally, right-click the JSP file just written, run-run through the server mode;
5. http Status 404 Workaround appears
(1), check whether the JSP file is in the WebContent directory;
(2), right-servers The tomcat under the view, click Properties, in general-location: Click Switch location to make it the path of the Tomcat server;
(3), double-click Tomcat server under Servers view, select the second item of server location, and save it;
If server location cannot be selected, remove the items under Tomcat Server and right-click on clean ..., then go back to select server location;
6. Port occupancy
Double-click the Tomcat server on the right side of the servers view to modify the port and save it;
Java EE and Tomcat environments