In order to learn the servlet, I decided to install Tomcat (I have heard of it).
I have found Tomcat's related information, found a (Win2000 Tomcat Apache PHP MySQL ... Guide). Temporarily not preparing to install PHP and MySQL, follow the advice to apache and tomcat.
The information on Tomcat is 4.x, and the latest is 5.x; the same apache is also raised from 1.3.x to 2.0.x. But it is ok, it is not very different. Installing Apache is very simple. Basically, it is OK that is OK according to the installed Wizard. After installing the boot service, look at the browser, http: / / localhost can, no need to manage him.
Here is to install Tomcat, I downloaded the compressed version, and I can decompressed directly. START, from the browser should be able to see the Tomcat welcome page of http: / / localhost: 8080.
Here is the information to be integrated with Tomcat and Apache (in fact, I am not very clear, how good it is so, but he said that the static page is handled, and you will do it). According to the author's point, go to MOD_JK. This is a bit twisted, I hope everyone will not make this stupid, I saw JK1.2 and JK2 two Connector at the Tomcat download page. At that time, I went to MOD_JK but I can't find it. Depressed for a long time, open the downloaded JK2 compression package, but found that it is mod_jk * .dll. . . Haha, stupid.
Then follow the information, proceed as follows: 1. Copy mod_jk.dll to Apache's corresponding directory (apache2.0.48 is the version I use, no libexec directory, according to another article, put it in the modules directory, then Article I forgot where Google should be able to find it). 2, in the logs directory in the Apache installation directory, establish three files for stderr.log, stdout.log, and jk2.shm so that the JK2 connection module is used. The file name here can be taken at will, but it is necessary to modify the content in the relevant configuration file, it is recommended to use the default name. In addition, this step is not too important, you can ignore (I guess). 3. This step and the next step is a key step. Create a workers2.properties file in the Apache's confed. I will give another file. 4, there is a jk2.properties file in the Tomcat's confedment (Tomcat 5.x version is original, the old version does not know if there is no? No, you can build it yourself), the file content I will also list. 5. Edit the httpd.conf profile in Apache's confedment, plus this line in the top of the LoadModule block: loadModule JK2_Module Modules / Mod_jk2.dll. The mod_jk2.dll here is the name I decompressed from the JK2 compression package. The JK2 compression package I use is: jakarta-tomcat-connectors-jk2.0.2-win32-apache2.0.43.zip. It can be seen that the file is placed in the modules directory. It should be noted here that the different data is different from the data, and the JK2 export function changes, from JK_MODULE to JK2_MODULE, this can be found by viewing the mod_jk2.dll's export function table. So this line is different from the information. 6. Close Tomcat service and restart Apache. If everything goes well, then http: / / / localhost: 8080 in the browser will still see Tomcat Welcome page, indicating success. If you start the Apache service, the failed prompt is popped, indicating that there is an error in the configuration file, and you can view the process of parsing the configuration file through the command line Apache -s, and the positioning error is located. If you start normal (you can see the Apache Welcome page), you can't access the Tomcat, you can view the logs / error.log file to see the problem records when Apache startup, usually know which step occurs.
Some precautions when installing: 1, you need to install JDK before installing Tomcat, I installed J2SE 1.4. It is best to set the path, mainly Java_Home, Tomcat_Home, and it is very important to miss the classpath. Under Windows, these are environment variables, you can use "My Computer" on the desktop to open the property, select Environment Variables in the Advanced page to define, edit. 2, Tomcat management: Tomcat is installed after accessing the Tomcat Welcome page, you can access the STATUS, JSP EXAMPLE, SERVET EXAMPLE, etc., but access these content is required to log in and have appropriate permissions. Tomcat's permissions are controlled through the Role controlled by the user. The user profile is the Tomcat-Uses.xml file in the CONF directory of the Tomcat installation directory. The default three users do not have admin and manager permissions so they have no right to access Status (Example I forgot to access: P). The solution is very simple, modify the tomcat-uses.xml file, add the following two lines