Wanted to build a webapp with Maven this morning.
And then index.jsp suit's error.
At that time my mood is 10,000 grass mud horse ran over ah, why you give me to create the WebApp will also error AH!!!!!!
Then Baidu a bit, all kinds of said less servlet-api. I also know less ah, but such a solution I am not satisfied!!!!
Why, because why do I have to manually pom.xml write in such a silly word,
I create a new dynamic WebApp to Maven do not write why I directly use maven template will write Ah.
Then I look for, find AH find. Finally found an extremely perfect solution.
You don't have to look at the veterans, I just want to tell new people like me.
That's right-click the project to find Buildpath->configuration BuildPath
And find the Add Library in the libraries bar.
It's good to find your local server in server runtime.
And then the advantage of doing that is that it will be generated in the Java Resources directory
Src/main/java,src/test/java. I don't have to fool myself to create those two directories again!!!
------------
The local tomcat environment is not loaded
Reprint: http://blog.csdn.net/heapstackk/article/details/52167775
Solve the problem of MAVEN building WebApp index.jsp Error