Problem Description:
Because of the interface management system, the online mall project was temporarily shelved for a period of time, today to find out, the project imported into the MyEclipse, found that the project file has a lot of small red fork, as shown in the following figure:
Open the error code file, see what is wrong, what the error message is, as shown in the following figure:
This is only the error message of the class file, the error message of JSP page is as follows:
Problem Solving:
Know the error file and error information, then it is necessary to find a solution. Copy the error information into the search box, to search the solution, found that the solution to the problem is very simple, the cause of this kind of error is: your project in the import, did not Jsp-api.jar and Servlet-api.jar these two jars introduced, it caused such a mistake. So where do I find these two jar packs? There is a Lib folder in the Tomcat installation path, which is shown in the following figure (Tomcat7.0 for example)
Here is a look at the specific solution.
In MyEclipse (mine is MyEclipse2014), right-click the item, select Properties->javabuild path->libraries->add External JARs, Find the installation path for Tomcat in your computer, select Servlet-api.jar and Jsp-api.jar under the Lib folder, and click "OK" after adding it.
And then you'll see your project without those annoying little red forks,
Summary: In fact, in this error, I was at a loss, so I went to find someone to ask, asked a not, and then I feel that this problem is very difficult, not quiet heart to analyze the cause of the problem, so the delay for a long time. Later feel that ask others no effect, try to find their own answers, the most initial analysis to determine is less jar package, but do not know which one, so the online search, identified the missing jar package, and then is to add jar package, I started to think of the download, and then introduced. Later searched search, found a more convenient way, so the problem is solved. The biggest harvest is to solve the problem, in the face of the problem must be calm down to analyze, the first of their own independent solution, others may not have encountered.