Configuring Tomcat in Eclipse
Create a new dynamic Web project first
Click New Runtime ...
Choose Apache Tomcat V7.0,next
Select the Tomcat installation path in Tomcat installation directory, finish, go back to the original wizard, click Next
Continue next, and then select Generate Web. XML Deployment Descriptor
Then finish, then select the Server tab below the Eclipse interface and click on the link
Select the runtime Environment,next we created, add our project to the right, finish
The tomcat configuration is then completed
Configuring Struts2 in Eclipse
According to the above to set up the project, and then to STRUTS2 configuration, I use Struts 2.3.30, download struts-2.3.30-apps.zip in the official website, find Struts2-blank.war, unzip, will Struts2-blank Copy all jar packages under the \web-inf\lib directory to the Project Webcontent\web-inf\lib folder
Copy the Struts.xml under the Struts2-blank\web-inf\src\java directory to the project SRC
Copy the contents of Web. XML in the Struts2-blank\web-inf directory to the project's Web. xml file, as
At this point the STRUTS2 configuration ends
configuring MySQL in Eclipse
Download MySQL Java driver mysql-connector-java-5.1.39.zip on official website
Unzip, find the Mysql-connector-java-5.1.39-bin.jar, and add it to the project's build path
For ease of deployment to the SAE, the driver is also copied to the Webcontent\web-inf\lib
At this point, the MySQL configuration is complete
Summary
This article describes how to build the Struts2+tomcat+mysql programming environment, which is the basis for application development.
Java ee struts2+tomcat+mysql Programming: 1. Development environment Configuration