问题
I created simple maven web application project. After creation there were no 'src/main/java' and 'src/test/java' folders but only 'src/main/resources'. I added this two folders and updated maven project.
Than I added some package to 'src/main/java' and try to add servlet by right click at package element
At next step I see window with some servlet details
But when I start to add servlet name eclipse shows me message that "Not a java source folder". By the same way I can add simple class to this pachage without any problem but in case of servlet I cannot. Do I miss something during configuration?
回答1:
I could not find the cause of the problem, but I solved it restarting Eclipse (I have Eclipse Neon.2 Release (4.6.2)).
来源:https://stackoverflow.com/questions/25107628/creating-new-servlet-in-eclipse-kepler-for-maven-web-app-project