In MyEclipse, there are two common ways to add a reference jar package, one is to add referenced Library, this way is very simple, out of the selected project right-->import, you can also directly to the webroot->web-inf- >lib the jar file is copied, the disadvantage is that the next time you add the same jar package, you will find the jar package file and then repeat the work.
The second one is to add the user Library, as follows:
1. Select Project Right-click->build path->add Libraries ...
2. Select User Library->next
3. Click the User Library button
4. Click the New button
5. Enter the library name (I'm going to import the Struts 2.1.6 jar package and the JDBC jar package, so you can use the Struts 2.1.6 library for ease of memory)
6. Click OK
7. Select the user library and click Add Jars
8. Locate the corresponding jar package, and then click OK.
The final result is as follows:
When you need to import struts 2.1.6 again later, you can repeat steps 1, 2, 3, and then select Struts 2.1.6 Library.