Javaexception
Error:
The import Javax.servlet cannot be resolved
The import javax.servlet.http.HttpServletRequest cannot be resolved
Describe:
We often take other people's projects copy to their own here for two development or reference, and sometimes the above error, that is, the Eclipse project we import the project hint HttpServletRequest can not be cited, will accompany the headache of the small red fork appear.
Reason:
The specific reason is that our project inside the Web-inf/lib directory less the corresponding package: Package javax.servlet.http caused by, popular and exactly speaking is the lack of tomcat_home\lib under the Servlet-api.jar.
I import other people's projects, on other people's machines he configured the server, is generally tomcat, and in the process of copying the server's library will not be copied with the project, unless someone else the Tomcat library has been copied to the web-inf\ Lib under the.
Workaround:
Project-> Properties-> Java build Path-> Add Library-> server Runtime-> next-> Select your Server-> Fi Nish