Before developing a Java Web environment, the first thing you need to do is to build a development environment. The development environment is successfully built. Next is to test the entire development environment. You can write a simple JSP program and publish it to the Tomcat application server to run.
This article focuses on the Tomcat configuration process, the specific content is as follows
1. Download Tomcat7.0; download address: http://tomcat.apache.org/download-70.cgi; download the corresponding version according to your own system.
2. Unzip the downloaded compressed package to the root directory of a certain hard disk, and I unzip it to the root directory of D disk.
3. Configure Tomcat environment variables:
Right-click [My Computer]---[Properties]----[Advanced System Settings]---[Environment Variables]
1. Create a new user variable name: CATALINA_BASE, variable value: D:/apache-tomcat-7.0.54
2. Create a new user variable name: CATALINA_HOME, variable value: D:/apache-tomcat-7.0.35
3. Open PATH and add variable value: %CATALINA_HOME%/lib; %CATALINA_HOME%/bin
4. Start Tomcat service:
There are two methods:
1. Method 1: Enter the command: startup under the CMD command, and the following dialog box appears, indicating that the service starts successfully.
2. Method 2: Enter the command: catalina run under the CMD command, and the following dialog box appears, indicating that the service starts successfully.
5. Test Tomcat:
Open the browser and enter http://localhost:8080 in the address bar to press Enter. If you see a JSP page that comes with Tomcat, it means that your Tomcat has been successfully built.
Eclipse configuration
1. Download the eclipse3.7_win7_64-bit decompression version and enter the official website http://www.eclipse.org/downloads/; click donwload to enter the download page. The downloads on both figures in the following figure can be accessed to the download page:
2. Select the for javaEE Developers version below, pay attention to one problem: select 64-bit and 32-bit versions according to your system version to download
3. After downloading, you will get a zip file, extract the file to any directory on your computer, and then open this directory, which contains an eclipse.exe file. Double-click this file to start your eclipse.
4. During the startup process, the program will display a dialog box in the workspace. The workspace is used to store your project files. You can use the program's default, click OK, and you can also select a folder to store your files. Then click Browse and re-specify the directory where your project files are stored:
5. Configure the association TOMCATA. Click [Window]---[preferences]---[Server]---[Runtime Environment]
6. Click [Add]-select the corresponding TOMCAT version---[Next]---[Browse..] to select the path to decompress tomcat--[OK]-----[Finish]
7. At this point, the JavaEE development environment has been built. You can now build a web project to test it.
You can learn from previous articles: WIN7 system JavaEE (java+tomcat7+Eclipse) environment configuration tutorial (I)
The above is all the content of this article. I hope it will be helpful to everyone's learning and I hope everyone will support Wulin.com more.