1. Prepare tools
- Eclipse 4.2 (to the official website download: http://www.eclipse.org/downloads/ to download Eclipse IDE for Java EE developers
- Tomcat 7.x (Tomcat on my machine comes with XAMPP)
- JDK 7
2. Eclipse 4.2 Configuration
Similarly, open the menu window-> preferences and expand server-> runtime environment. Then add a tomcat. Operation:
3. Create a test project
Create a new JSP file named index. jsp in the webcontent folder.
Edit index. jsp and enter some words or HTML code in <body> </body>.
4. Project deployment and Testing
In the following servers column, click New server wizard
Right-click Tomcat v7.0 server at localhost and click Add and remove to deploy the project.
Select helloworld and click Add to add the project to the server.
Start the server
Open your browser and enter localhost: 8080/helloworld in the address bar to test