Recently want to learn Java Web, here to record the learning process, but also convenient later if you forget, can be easily consulted.
This is about the installation of Tomcat, the latest Tomcat is Tomcat 8. Can be downloaded from the Tomcat official website, I am using the Windows version (my Linux is still learning AH).
Tomcat is developed in Java, so installing Tomcat before installing JDK,TOMCAT8 only supports JDK1.7 and newer versions. Installing the JDK is simple, not here.
There are two ways to install the Windows version of Tomcat, one is to install it with the installation package, and it is easy for the novice to press the next step.
Another is the use of compressed package, this is actually very simple, download the package, unzip to the directory you want (for example: D:\TOMCAT8), only need to configure the JDK Java_home, and then run the Tomcat directory bin\ Startup.bat can start Tomcat and run Bin\shutdown.bat to turn Tomcat off. It's easy, it's easier than installing the package. Of course, the installation package will install Tomcat as a Windows service, in fact, using the unpacking package can also be done: on the command line (CMD) jump to the Tomcat directory under the Bin directory, and then enter the service install installation Services Remove), then you can manage Tomcat as a Windows service.
Configuring Tomcat in Eclipse is also simple, in Java ee version of Eclipse, locate servers view, right-click New Server, select TOMCAT8 and then configure the name of the server, the Tomcat directory installed above, You can do it.
Once the server is configured, it is ready to start.
One thing to note here is that sometimes when you start Tomcat in Eclipse, you may notice that the APR based Apache Tomcat Native Library which allows optimal performance in product Ion environments was wasn't found on the Java.library.path
Just double-click the Tomcat service in Servers view, and in the pop-up overview page, click Open Launch Configuration, in the Pop-up dialog box, select Arguments page, and in the VM arguments add "- Djava.library.path= "Your Tomcat directory \ Bin" (excluding the title number) and restarting the Tomcat service will solve the problem.